You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/azure-data-studio/build-and-publish-changes-to-table-using-sql-projects.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,16 +15,17 @@ ms.topic: tutorial
15
15
16
16
With the help of the SQL Database Projects extension, SQL projects (including tables, views, stored procedures) can be edited without the need to be connected to a server instance in Azure Data Studio. The tutorial below will show how to:
17
17
18
-
1. Create a SQL Database Project of the ***AdventureWorks2019*** database.
18
+
1. Create a SQL Database Project of the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database.
19
19
20
-
2. Make and deploy changes to a table in the ***AdventureWorks2019*** database using SQL Database Projects and confirming this change in the locally connected server instance where this database resides.
20
+
2. Make and deploy changes to a table in the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database using SQL Database Projects and confirming this change in the locally connected server instance where this database resides.
21
21
22
-
> [!NOTE]
23
-
> Please note that you will need to have the [AdventureWorks sample database](../samples/adventureworks-install-configure.md) downloaded and available in Azure Data Studio to follow along this tutorial. You will also need to have the SQL Database Projects extension installed. Refer to the [SQL Database Projects documentation](extensions/sql-database-project-extension.md) to learn more about this extension.
You will also need to have the SQL Database Projects extension installed. Refer to the [SQL Database Projects documentation](extensions/sql-database-project-extension.md) to learn more about this extension.
24
25
25
26
## Create a SQL Database Project
26
27
27
-
1. Navigate to the AdventureWorks database object located in the object explorer, right-click on it and select **Create Project from Database**:
28
+
1. Navigate to the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database object located in the object explorer, right-click on it and select **Create Project from Database**:
28
29
29
30
:::image type="content" source="media/table-designer-azure-data-studio/table-designer-show-how-to-create-project-from-database.png" alt-text="Screenshot of the object explorer in Azure Data Studio showing how to create a project from a database object.":::
30
31
@@ -43,14 +44,14 @@ With the help of the SQL Database Projects extension, SQL projects (including ta
43
44
Add another column named ***Citizenship*** of type nvarchar(50) and publish this change:
44
45
:::image type="content" source="media/table-designer-azure-data-studio/table-designer-publish-changes-to-sql-project.png" alt-text="Screenshot of Azure Data Studio showing how to publish changes SQL Database Projects.":::
45
46
46
-
2. From the file menu in the Database Projects, right-click on the project root node in which your project resides, and select **Build** to build this project. You should see a success or error message in the output terminal for a successful or failed build. When finished, right-click this same folder and select **Publish** to publish this project to the ***AdventureWorks2019*** database in your local host server connection.
47
+
2. From the file menu in the Database Projects, right-click on the project root node in which your project resides, and select **Build** to build this project. You should see a success or error message in the output terminal for a successful or failed build. When finished, right-click this same folder and select **Publish** to publish this project to the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database in your local host server connection.
47
48
48
49
:::image type="content" source="media/table-designer-azure-data-studio/table-designer-show-how-to-build-and-publish-changes-to-sql-project.png" alt-text="Screenshot of Azure Data Studio showing how to build and publish changes SQL Database Projects.":::
49
50
50
51
> [!NOTE]
51
52
> Please note that you will need to be connected to your local host for this step. This can be done by clicking the plug icon in **Publish Project** dialog box.
52
53
53
-
3. Exit the SQL Database Projects view. Then, go to the object explorer in your server connection and navigate to the **Tables** folder of ***AdventureWorks2019*** database. Open the table design of the table you made changes to and confirm the change made. In this case, we added a new column, ***Citizenship*** to the ***Person.Person*** table:
54
+
3. Exit the SQL Database Projects view. Then, go to the object explorer in your server connection and navigate to the **Tables** folder of [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database. Open the table design of the table you made changes to and confirm the change made. In this case, we added a new column, ***Citizenship*** to the ***Person.Person*** table:
54
55
55
56
:::image type="content" source="media/table-designer-azure-data-studio/table-designer-confirm-changes-made-to-project-in-local-host.png" alt-text="Screenshot of Azure Data Studio showing the changes made to the table in the local host connection.":::
Copy file name to clipboardExpand all lines: docs/azure-data-studio/overview-of-the-table-designer-in-azure-data-studio.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,12 +29,11 @@ The Table Designer consists of a window split into three separate panes. The fir
29
29
30
30
The SQL Server connection in which your database resides needs to be active in order to create tables. This is indicated by the green dot at the bottom right corner of the server connection icon in the object explorer (below). If red (this means the connection is inactive), select the server connection name in the object explorer to activate the connection. For a tutorial on connecting to SQL Server, check out the [Use Azure Data Studio to connect and query SQL Server tutorial](quickstart-sql-server.md) article.
31
31
32
-
> [!NOTE]
33
-
> We will be using the "AdventureWorks2019" sample database in this tutorial. If you haven't already, please refer to [AdventureWorks sample databases](../samples/adventureworks-install-configure.md) to download this sample database.
1. Right-click the **Tables** folder in the **AdventureWorks2019** database drop-down and select **New Table**:
36
+
1. Right-click the **Tables** folder in the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database drop-down and select **New Table**:
38
37
39
38
:::image type="content" source="media/table-designer-azure-data-studio/table-designer-traversing-through-object-explorer-to-create-new-table.png" alt-text="Screenshot of Table Designer showing how to traverse object explorer to create a new table.":::
40
39
@@ -49,11 +48,11 @@ The SQL Server connection in which your database resides needs to be active in o
49
48
> [!NOTE]
50
49
> Pay attention to the changes in the read-only Transact-SQL code generated as changes are made to the default table.
51
50
52
-
5. Now that we have finished the design for our new table, we need to publish this change to the **AdventureWorks2019** database. To do this, select the "Publish" icon as seen below. Publishing can also be done by using the save command shortcut on your local device.
51
+
5. Now that we have finished the design for our new table, we need to publish this change to the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database. To do this, select the "Publish" icon as seen below. Publishing can also be done by using the save command shortcut on your local device.
53
52
54
53
:::image type="content" source="media/table-designer-azure-data-studio/table-designer-show-publish-icon.png" alt-text="Screenshot of Table Designer highlighting publish icon.":::
55
54
56
-
Once this icon is selected, a preview dialog window appears showing you all the actions performed in creating a table. It also provides the option to publish the changes directly to the **AdventureWorks2019** database or generate the editable SQL script in a query editor that can be saved as a file locally or executed to publish this script to the database.
55
+
Once this icon is selected, a preview dialog window appears showing you all the actions performed in creating a table. It also provides the option to publish the changes directly to the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database or generate the editable SQL script in a query editor that can be saved as a file locally or executed to publish this script to the database.
57
56
58
57
:::image type="content" source="media/table-designer-azure-data-studio/save-dialog-for-table-designer.png" alt-text="Screenshot of Table Designer showing save dialog box.":::
### <aid="copyinto"></a> Copy files into container
163
163
164
-
The following example copies the **AdventureWorks2016CTP3.bak** file from the local machine to the SQL Server master instance container (`mssql-server`) in the `master-0` pod. The file is copied to the `/tmp` directory in the container.
164
+
The following example copies the [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] file from the local machine to the SQL Server master instance container (`mssql-server`) in the `master-0` pod. The file is copied to the `/tmp` directory in the container.
Now, restore the database. The following script is an example. Replace the names/paths as needed depending on your database backup.
79
79
80
80
```sql
81
-
RESTORE DATABASE AdventureWorks2016CTP3
82
-
FROM DISK='/tmp/AdventureWorks2016CTP3.bak'
83
-
WITH MOVE 'AdventureWorks2016CTP3_Data' TO '/var/opt/mssql/data/AdventureWorks2016CTP3_Data.mdf',
84
-
MOVE 'AdventureWorks2016CTP3_Log' TO '/var/opt/mssql/data/AdventureWorks2016CTP3_Log.ldf',
85
-
MOVE 'AdventureWorks2016CTP3_mod' TO '/var/opt/mssql/data/AdventureWorks2016CTP3_mod'
81
+
RESTORE DATABASE AdventureWorks2022
82
+
FROM DISK='/tmp/AdventureWorks2022.bak'
83
+
WITH MOVE 'AdventureWorks2022_Data' TO '/var/opt/mssql/data/AdventureWorks2022_Data.mdf',
84
+
MOVE 'AdventureWorks2022_Log' TO '/var/opt/mssql/data/AdventureWorks2022_Log.ldf',
85
+
MOVE 'AdventureWorks2022_mod' TO '/var/opt/mssql/data/AdventureWorks2022_mod'
86
86
```
87
87
88
88
## Configure data pool and HDFS access
89
89
90
90
Now, for the SQL Server master instance to access data pools and HDFS, run the data pool and storage pool stored procedures. Run the following Transact-SQL scripts against your newly restored database:
91
91
92
92
```sql
93
-
USE AdventureWorks2016CTP3
93
+
USE AdventureWorks2022;
94
94
GO
95
95
-- Create the SqlDataPool data source:
96
96
IF NOT EXISTS(SELECT*FROMsys.external_data_sourcesWHERE name ='SqlDataPool')
Copy file name to clipboardExpand all lines: docs/connect/ado-net/sql/modify-large-value-max-data.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ The `OPENROWSET` function includes the `BULK` rowset provider, which allows you
37
37
38
38
The `OPENROWSET BULK` option arguments provide significant control over where to begin and end reading data, how to deal with errors, and how data is interpreted. For example, you can specify that the data file be read as a single-row, single-column rowset of type `varbinary`, `varchar`, or `nvarchar`. For the complete syntax and options, see SQL Server Books Online.
39
39
40
-
The following example inserts a photo into the ProductPhoto table in the AdventureWorks sample database. When using the `BULK OPENROWSET` provider, you must supply the named list of columns even if you aren't inserting values into every column. The primary key in this case is defined as an identity column, and may be omitted from the column list. Note that you must also supply a correlation name at the end of the `OPENROWSET` statement, which in this case is ThumbnailPhoto. This correlates with the column in the `ProductPhoto` table into which the file is being loaded.
40
+
The following example inserts a photo into the ProductPhoto table in the [!INCLUDE [sssampledbobject-md](../../../includes/sssampledbobject-md.md)] sample database. When using the `BULK OPENROWSET` provider, you must supply the named list of columns even if you aren't inserting values into every column. The primary key in this case is defined as an identity column, and may be omitted from the column list. Note that you must also supply a correlation name at the end of the `OPENROWSET` statement, which in this case is ThumbnailPhoto. This correlates with the column in the `ProductPhoto` table into which the file is being loaded.
41
41
42
42
```sql
43
43
INSERT Production.ProductPhoto (
@@ -77,7 +77,7 @@ The WRITE method specifies that a section of the value of the *column_name* will
77
77
This Transact-SQL example updates a partial value in DocumentSummary, an `nvarchar(max)` column in the Document table in the AdventureWorks database. The word 'components' is replaced by the word 'features' by specifying the replacement word, the beginning location (offset) of the word to be replaced in the existing data, and the number of characters to be replaced (length). The example includes SELECT statements before and after the UPDATE statement to compare results.
78
78
79
79
```sql
80
-
USE AdventureWorks;
80
+
USE AdventureWorks2022;
81
81
GO
82
82
--View the existing value.
83
83
SELECT DocumentSummary
@@ -179,7 +179,7 @@ The following code retrieves the name and the `LargePhoto` object from the `Prod
Large value types can be used in <xref:Microsoft.Data.SqlClient.SqlParameter> objects the same way you use smaller value types in <xref:Microsoft.Data.SqlClient.SqlParameter> objects. You can retrieve large value types as <xref:Microsoft.Data.SqlClient.SqlParameter> values, as shown in the following example. The code assumes that the following GetDocumentSummary stored procedure exists in the AdventureWorks sample database. The stored procedure takes an input parameter named @DocumentID and returns the contents of the DocumentSummary column in the @DocumentSummary output parameter.
182
+
Large value types can be used in <xref:Microsoft.Data.SqlClient.SqlParameter> objects the same way you use smaller value types in <xref:Microsoft.Data.SqlClient.SqlParameter> objects. You can retrieve large value types as <xref:Microsoft.Data.SqlClient.SqlParameter> values, as shown in the following example. The code assumes that the following GetDocumentSummary stored procedure exists in the [!INCLUDE [sssampledbobject-md](../../../includes/sssampledbobject-md.md)] sample database. The stored procedure takes an input parameter named @DocumentID and returns the contents of the DocumentSummary column in the @DocumentSummary output parameter.
Copy file name to clipboardExpand all lines: docs/connect/oledb/ole-db-how-to/bulk-copy-data-using-irowsetfastload-ole-db.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ helpviewer_keywords:
24
24
25
25
A complete sample is available that illustrates the use of **IRowsetFastLoad** for bulk copying of the records into a table. In this sample, 10 records are added to the table **IRFLTable**. You need to create the table **IRFLTable** in the database.
26
26
27
-
This sample requires the AdventureWorks sample database, which you can download from the [Microsoft SQL Server Samples and Community Projects](https://go.microsoft.com/fwlink/?LinkID=85384) home page.
> When possible, use Windows Authentication. If Windows Authentication is not available, prompt users to enter their credentials at run time. Avoid storing credentials in a file. If you must persist credentials, you should encrypt them with the [Win32 crypto API](/windows/win32/seccrypto/cryptography-reference).
@@ -55,7 +55,7 @@ helpviewer_keywords:
55
55
Execute the third ( [!INCLUDE[tsql](../../../includes/tsql-md.md)]) code listing to delete the table used by the application.
56
56
57
57
```
58
-
USE AdventureWorks
58
+
USE AdventureWorks2022;
59
59
GO
60
60
61
61
IF EXISTS (SELECT name FROM sysobjects WHERE name = 'IRFLTable')
Copy file name to clipboardExpand all lines: docs/connect/oledb/ole-db-how-to/enumerate-ole-db-data-sources-ole-db.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ helpviewer_keywords:
23
23
24
24
When the server is turned off or on, it can take few minutes to update the information in these domains.
25
25
26
-
This sample requires the AdventureWorks sample database, which you can download from the [Microsoft SQL Server Samples and Community Projects](https://go.microsoft.com/fwlink/?LinkID=85384) home page.
> When possible, use Windows Authentication. If Windows Authentication is not available, prompt users to enter their credentials at run time. Avoid storing credentials in a file. If you must persist credentials, you should encrypt them with the [Win32 crypto API](/windows/win32/seccrypto/cryptography-reference).
Copy file name to clipboardExpand all lines: docs/connect/oledb/ole-db-how-to/fetch-columns-using-irow-getcolumns-ole-db.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ helpviewer_keywords:
45
45
46
46
In the DBCOLUMNACCESS structure, if pData is NULL and cbMaxLen is 0, the call to IRow->GetColumns returns only the actual column length. In this case IRow->GetColumns can be called again on the same column to retrieve the actual data. This sample is not supported on IA64.
47
47
48
-
This sample requires the AdventureWorks sample database, which you can download from the [Microsoft SQL Server Samples and Community Projects](https://go.microsoft.com/fwlink/?LinkID=85384) home page.
Copy file name to clipboardExpand all lines: docs/connect/oledb/ole-db-how-to/fetch-columns-using-irow-getcolumns-or-irow-open-and-isequentialstream.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ helpviewer_keywords:
39
39
## Example
40
40
This example shows how to fetch a single row using IRow. In this example one column at a time is retrieved from the row. This example illustrate the use of IRow::Open() as well as IRow::GetColumns(). To read the column data, the example uses ISequentialStream::Read.
41
41
42
-
This sample requires the AdventureWorks sample database, which you can download from the [Microsoft SQL Server Samples and Community Projects](https://go.microsoft.com/fwlink/?LinkID=85384) home page.
0 commit comments