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
description: "Learn about SQL Server Data Tools (SSDT). See how to install this database development tool set with Visual Studio 2019 and 2022."
4
4
author: dzsquared
5
5
ms.author: drskwier
6
-
ms.reviewer: maghan
7
-
ms.date: 05/30/2024
6
+
ms.reviewer: maghan, randolphwest
7
+
ms.date: 04/08/2025
8
8
ms.service: sql
9
9
ms.subservice: ssdt
10
10
ms.topic: install-set-up-deploy
@@ -29,7 +29,7 @@ The release notes for SSDT and its components are available for [Visual Studio 2
29
29
30
30
SSDT is installed as a Visual Studio component, both for [online installation](#install-ssdt-with-visual-studio) and [offline installation](#offline-installation). Analysis Services, Integration Services, and Reporting Services projects are available as separate extensions for each version.
31
31
32
-
> [!NOTE]
32
+
> [!NOTE]
33
33
> SDK-style SQL projects in Visual Studio are available as part of the **SQL Server Data Tools, SDK-style (preview)** feature for Visual Studio 2022, separate from the original SSDT. The SDK-style project format is based on the new SDK-style projects introduced in .NET Core and is the format used by the SQL Database Projects extension for Azure Data Studio and VS Code. For more information, see [SQL Server Data Tools, SDK-style (preview)](sql-server-data-tools-sdk-style.md).
34
34
35
35
## Install SSDT with Visual Studio
@@ -40,58 +40,70 @@ To modify the installed Visual Studio workloads to include SSDT, use the Visual
40
40
41
41
1. Launch the Visual Studio Installer. In the Windows Start menu, you can search for "installer."
42
42
43
-
2. In the installer, select for the edition of Visual Studio that you want to add SSDT to, and then choose **Modify**.
43
+
1. In the installer, select **Modify**for the version of Visual Studio to which you want to add SSDT.
44
44
45
-
3. Select **SQL Server Data Tools** under **Data storage and processing** in the list of workloads.
45
+
1. Select **SQL Server Data Tools** under **Data storage and processing** in the list of workloads.
46
46
47
-
:::image type="content" source="../ssdt/media/download-sql-server-data-tools-ssdt/data-workload-2022.png" alt-text="Screenshot of Data storage and processing workload 2022." lightbox="../ssdt/media/download-sql-server-data-tools-ssdt/data-workload-2022.png":::
47
+
:::image type="content" source="media/download-sql-server-data-tools-ssdt/data-workload-2022.png" alt-text="Screenshot of Data storage and processing workload 2022." lightbox="media/download-sql-server-data-tools-ssdt/data-workload-2022.png":::
48
48
49
49
### Visual Studio for Arm64
50
50
51
-
Visual Studio is available as a [native Arm64 application](/visualstudio/install/visual-studio-on-arm-devices) on Windows 11 Arm64. In Visual Studio 17.10 and later, SSDT is available for Arm64 with [some limitations](https://techcommunity.microsoft.com/t5/azure-sql-blog/announcing-sql-server-data-tools-ssdt-for-arm64-architecture-in/ba-p/4103928). To install or configure Visual Studio to include SSDT on an Arm64 device:
51
+
Visual Studio is available as a [native Arm64 application](/visualstudio/install/visual-studio-on-arm-devices) on Windows 11 Arm64. In Visual Studio 17.10 and later, SSDT is available for Arm64 with [some limitations](https://techcommunity.microsoft.com/blog/azuresqlblog/announcing-sql-server-data-tools-ssdt-for-arm64-architecture-in-visual-studio-17/4103928). To install or configure Visual Studio to include SSDT on an Arm64 device:
52
52
53
53
1. Install Visual Studio 17.10 or later on your Arm64 device.
54
54
55
-
2. In the installer, select the **Individual components** tab and search for **SQL Server Data Tools**.
56
-
57
-
:::image type="content" source="../ssdt/media/download-sql-server-data-tools-ssdt/ssdt-component-install.png" alt-text="Screenshot of SQL Server Data Tools for Arm64." lightbox="../ssdt/media/download-sql-server-data-tools-ssdt/ssdt-component-install.png":::
55
+
1. In the installer, select the **Individual components** tab and search for **SQL Server Data Tools**.
58
56
59
-
3. Select **SQL Server Data Tools** and then choose **Modify**.
57
+
:::image type="content" source="media/download-sql-server-data-tools-ssdt/ssdt-component-install.png" alt-text="Screenshot of SQL Server Data Tools for Arm64." lightbox="media/download-sql-server-data-tools-ssdt/ssdt-component-install.png":::
58
+
59
+
1. Select **SQL Server Data Tools** and then choose **Modify**.
60
60
61
61
## Install extensions for Analysis Services, Integration Services, and Reporting Services
62
62
63
63
For Analysis Services (SSAS), Integration Services (SSIS), or Reporting Services (SSRS) projects, you can install the appropriate [extensions](/visualstudio/ide/finding-and-using-visual-studio-extensions) from within Visual Studio with **Extensions** > **Manage Extensions** or from the [Marketplace](https://marketplace.visualstudio.com/search?term=services&target=VS&category=All%20categories&vsVersion=&sortBy=Relevance).
| Analysis Services models<br /><br />Reporting Services reports | SQL Server 2008 - SQL Server 2019 |
93
103
| Integration Services packages | SQL Server 2012 - SQL Server 2022 |
94
104
105
+
---
106
+
95
107
## Offline installation
96
108
97
109
For scenarios where offline installation is required, such as low bandwidth or isolated networks, SSDT is available for offline installation. Two approaches are available:
@@ -109,26 +121,15 @@ To understand the license terms and use cases for Visual Studio, refer to [Visua
109
121
110
122
To download and install SSDT for Visual Studio 2017, or an older version of SSDT, see [Previous releases of SQL Server Data Tools (SSDT and SSDT-BI)](previous-releases-of-sql-server-data-tools-ssdt-and-ssdt-bi.md).
111
123
112
-
## See also
124
+
## Related content
113
125
114
126
-[SSDT Team Blog](/archive/blogs/ssdt/)
115
-
116
127
-[DACFx API Reference](/dotnet/api/microsoft.sqlserver.dac)
117
-
118
128
-[Download SQL Server Management Studio (SSMS)](../ssms/download-sql-server-management-studio-ssms.md)
119
-
120
-
-[SQL projects in Azure Data Studio and VS Code](/azure-data-studio/extensions/sql-database-project-extension)
121
-
122
-
## Next steps
123
-
124
-
After installation of SSDT, work through these tutorials to learn how to create databases, packages, data models, and reports using SSDT.
title: Rename and Refactoring to Make Changes to your Database Objects
2
+
title: Rename and Refactoring to Make Changes to Your Database Objects
3
3
description: Learn about the Rename and Refactor menus in the Transact-SQL Editor. See how to rename types, switch object schemas, expand wildcards, and fully qualify names.
# How to: Use Rename and Refactoring to Make Changes to your Database Objects
19
+
# How to: Use rename and refactoring to make changes to your database objects
20
+
21
+
The **Refactor** contextual menu in the Transact-SQL Editor allows you to rename or move an object to a different schema and preview all affected areas before committing the change. You can also use the **Refactor** menu to fully qualify all references to database objects, or expand any wildcard characters in `SELECT` statements in your database project.
19
22
20
-
The Refactor contextual menu in the Transact-SQL Editor allows you to rename or move an object to a different schema, and do a preview of all affected areas before committing the change. You can also use the Refactor menu to fully qualify all references to database objects, or expand any wildcard characters in `SELECT` statements in your database project.
21
-
22
23
> [!WARNING]
23
24
> The following procedure uses entities created in previous procedures in the [Project-Oriented Offline Database Development](../ssdt/project-oriented-offline-database-development.md) sections.
24
-
25
-
### To rename a type
26
-
27
-
1.Right-click the **Products** table (Products.sql) in **Solution Explorer** and select **View Code** to open the script in Transact-SQL editor.
28
-
29
-
2.Right-click `[Products]` in the script, select **Refactor**, and **Rename**.
30
-
31
-
3.In the **New Name** field, change it to **Product**. Leave the **Preview Changes** option checked and click**OK**.
32
-
33
-
4.In the next screen, you will be able to preview a list of scripts that are going to be affected by this rename operation. Specifically, all the places that refer to `Products`will be highlighted. This is very similar to the Find All References task in the previous procedure. Click anything on the top pane and view the actual change in the scripts (highlighted in green) in the bottom pane.
34
-
35
-
5. Click **Apply**.
36
-
37
-
6.For script files that are already opened in Table Designer or Transact-SQL Editor, notice that the Transact-SQL Editor has highlighted locations where changes have taken place with a green bar on the left.
38
-
39
-
7.Notice the addition of **TradeDev.refactorlog** in **Solution Explorer**. Double-click to open it. It contains an XML representation of all the changes in this session.
40
-
41
-
8.Press F5 to build and deploy the project to the local database.
42
-
43
-
9. Right-click the **TradeDev** database under **Local** in **SQL Server Object Explorer**, and select **Refresh**.
44
-
45
-
10. Expand **Tables**, and notice that the **Products** table has been renamed.
46
-
47
-
11. Right-click **Product** and select **View Data**. Notice that existing data is kept intact regardless of the rename operation.
25
+
26
+
##Rename a type
27
+
28
+
1. Right-click the `Products` table (`Products.sql`) in **Solution Explorer**, and select **View Code** to open the script in Transact-SQL Editor.
29
+
30
+
1.Right-click `[Products]` in the script, select **Refactor**, and **Rename**.
31
+
32
+
1.In the **New Name** field, change it to `Product`. Leave the **Preview Changes** option checked and select**OK**.
33
+
34
+
1.In the next screen, you can preview a list of scripts that this rename operation is going to affect. Specifically, all the places that refer to `Products`are highlighted. This process is similar to the Find All References task in the previous procedure. Select anything on the top pane and view the actual change in the scripts (highlighted in green) in the bottom pane.
35
+
36
+
1. Select **Apply**.
37
+
38
+
1.For script files that are already opened in Table Designer or Transact-SQL Editor, the Transact-SQL Editor highlights the locations where changes took place with a green bar on the left.
39
+
40
+
1.Notice the addition of `TradeDev.refactorlog` in **Solution Explorer**. Double-click to open it. It contains an XML representation of all the changes in this session.
41
+
42
+
1.Press **F5** to build and deploy the project to the local database.
43
+
44
+
1. Right-click the `TradeDev` database under **Local** in **SQL Server Object Explorer**, and select **Refresh**.
45
+
46
+
1. Expand **Tables**, and you see that the `Products` table was renamed.
47
+
48
+
1. Right-click `Product` and select **View Data**. Existing data is kept intact regardless of the rename operation.
48
49
49
50
> [!WARNING]
50
-
> If a refactor log is deleted, the complete history of the refactoring will be deleted. When the project is published to a database where prior refactor operations haven't been applied, any refactor operations completed before the refactor file was deleted, will be published as drop and create operations. As a result, data loss may occur.
51
-
52
-
### To expand wildcards
53
-
54
-
1. Expand the **Functions** node in **Solution Explorer**, and double-click **GetProductsBySupplier.sql**.
55
-
56
-
2. Place the cursor on the asterisk in this line and right-click. Select **Refactor**, and **Expand Wildcards**.
57
-
58
-
```
59
-
SELECT * from Product p
60
-
```
61
-
62
-
3. In the **Preview Changes** dialog box, click `SELECT * from Product p` on the top pane to highlight it.
63
-
64
-
4. In the **Preview Changes** pane below, notice that `*` has been expanded to the following in the script.
5. Click the **Apply** button. Notice the line that contains changes brought forth by the expand operation is again highlighted with a green bar on the left.
71
-
72
-
### To fully qualify database object names
73
-
74
-
1. Make sure **GetProductsBySupplier.sql** is still open in Transact-SQL Editor.
75
-
76
-
2. Place the cursor on `Product` in this line and right-click. Select **Refactor**, and **Fully-Qualify Names**.
77
-
78
-
```
79
-
SELECT [Id], [Name], [ShelfLife], [SupplierId], [CustomerId] from Product p
80
-
```
81
-
82
-
3. Click the **Apply** button in the **Preview Changes** dialog box. Notice the all the object references have been updated to include the name of the object's schema and, if the object has a parent, the name of the parent.
83
-
84
-
```
85
-
SELECT [p].[Id], [p].[Name], [p].[ShelfLife], [p].[SupplierId], [p].[CustomerId] from [dbo].[Product] p
86
-
```
87
-
88
-
### To move schema
89
-
90
-
1. Right-click the object that you want move. Select **Refactor**, and **Move Schema**.
91
-
92
-
2. In the **New Schema** list, click the name of the schema into which you want to move the object. Click OK.
93
-
94
-
If you selected the **Preview changes** check box, **the Preview Changes** dialog box appears. Otherwise, the object name is updated, and the object is moved to the new schema.
95
-
51
+
> If a refactor log is deleted, the complete history of the refactoring is also deleted. When the project is published to a database where previous refactor operations aren't applied, any refactor operations completed before the refactor file was deleted, are published as drop and create operations. As a result, data loss can occur.
52
+
53
+
## Expand wildcards
54
+
55
+
1. Expand the **Functions** node in **Solution Explorer**, and double-click `GetProductsBySupplier.sql`.
56
+
57
+
1. Place the cursor on the asterisk in this line and right-click. Select **Refactor**, and **Expand Wildcards**.
58
+
59
+
```sql
60
+
SELECT*FROM Product AS p;
61
+
```
62
+
63
+
1. In the **Preview Changes** dialog box, select `SELECT * from Product p` on the top pane to highlight it.
64
+
65
+
1. In the **Preview Changes** pane below, notice that `*` has been expanded to the following columns in the script.
1. Select the **Apply** button. Notice the line that contains changes brought forth by the expand operation is again highlighted with a green bar on the left.
72
+
73
+
## Fully qualify database object names
74
+
75
+
1. Make sure `GetProductsBySupplier.sql` is still open in Transact-SQL Editor.
76
+
77
+
1. Place the cursor on `Product` in this line and right-click. Select **Refactor**, and **Fully-Qualify Names**.
78
+
79
+
```sql
80
+
SELECT [Id],
81
+
[Name],
82
+
[ShelfLife],
83
+
[SupplierId],
84
+
[CustomerId]
85
+
FROM Product AS p;
86
+
```
87
+
88
+
1. Select the **Apply** button in the **Preview Changes** dialog box. All the object references are updated to include the name of the object's schema and, if the object has a parent, the name of the parent.
89
+
90
+
```sql
91
+
SELECT [p].[Id],
92
+
[p].[Name],
93
+
[p].[ShelfLife],
94
+
[p].[SupplierId],
95
+
[p].[CustomerId]
96
+
FROM [dbo].[Product] AS p;
97
+
```
98
+
99
+
## Move schema
100
+
101
+
1. Right-click the object that you want move. Select **Refactor**, and **Move Schema**.
102
+
103
+
1. In the **New Schema** list, select the name of the schema into which you want to move the object. Select OK.
104
+
105
+
If you select the **Preview changes** check box, **the Preview Changes** dialog box appears. Otherwise, the object name is updated, and the object is moved to the new schema.
0 commit comments