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: azure-sql/database/auditing-overview.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,6 @@ You can use SQL Database auditing to:
39
39
40
40
### Auditing limitations
41
41
42
-
-**User managed identity** authentication type for enabling auditing to **storage behind firewall** is not currently supported.
43
42
- Enabling auditing on a paused **Azure Synapse** is not supported. To enable auditing, resume Azure Synapse.
44
43
- Auditing for **Azure Synapse SQL pools** supports default audit action groups **only**.
45
44
- When you configure the auditing for your [logical server in Azure](logical-servers.md) or Azure SQL Database with log destination as the storage account, the target storage account must be enabled with access to storage account keys. If the storage account is configured to use Azure AD authentication only and not configured for access key usage, the auditing cannot be configured. <!-- REST API reference: - /rest/api/sql/2021-08-01-preview/server-blob-auditing-policies/create-or-update -->
Copy file name to clipboardExpand all lines: azure-sql/database/resource-limits-vcore-single-databases.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,8 +217,6 @@ The [serverless compute tier](serverless-tier-overview.md) is currently availabl
217
217
<sup>2</sup> Besides local SSD IO, workloads will use remote [page server](hyperscale-architecture.md#page-server) IO. Effective IOPS will depend on workload. For details, see [Data IO Governance](resource-limits-logical-server.md#resource-governance), and [Data IO in resource utilization statistics](hyperscale-performance-diagnostics.md#data-io-in-resource-utilization-statistics).
218
218
<sup>3</sup> Latency is 1-2 ms for data on local compute replica SSD, which caches most used data pages. Higher latency for data retrieved from page servers.
### <aid="gen5-hardware-part-1-2"></a>Hyperscale Standard-series (Gen5) compute generation (part 1 of 2)
@@ -1174,4 +1172,4 @@ This section includes details on previously available hardware.
1174
1172
- For information about general Azure limits, see [Azure subscription and service limits, quotas, and constraints](/azure/azure-resource-manager/management/azure-subscription-service-limits).
1175
1173
- For information about resource limits on a server, see [overview of resource limits on a server](resource-limits-logical-server.md) for information about limits at the server and subscription levels.
Copy file name to clipboardExpand all lines: azure-sql/managed-instance/log-replay-service-migrate.md
+2-20Lines changed: 2 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Make sure that you meet the following requirements for SQL Server:
42
42
- A log backup (not split for a transaction log file).
43
43
- For SQL Server versions 2008 to 2016, take a backup locally and [manually upload](#copy-existing-backups-to-your-blob-storage-account) it to your Azure Blob Storage account.
44
44
- For SQL Server 2016 and later, you can [take your backup directly](#take-backups-directly-to-your-blob-storage-account) to your Azure Blob Storage account.
45
-
- For SQL Server 2022, you can choose to use a managed identity instead of a shared access signature (SAS) token to authenticate to your Azure Blob Storage account.
45
+
46
46
47
47
48
48
Although having `CHECKSUM` enabled for backups isn't required, we highly recommend it for faster restore operations.
@@ -314,11 +314,7 @@ After your backups are ready, and you want to start migrating databases to a man
314
314
315
315
If you're on a supported version of SQL Server (starting with SQL Server 2012 SP1 CU2 and SQL Server 2014), and your corporate and network policies allow it, you can take backups from SQL Server directly to your Blob Storage account by using the native SQL Server [BACKUP TO URL](/sql/relational-databases/backup-restore/sql-server-backup-to-url) option. If you can use `BACKUP TO URL`, you don't need to take backups to local storage and upload them to your Blob Storage account.
316
316
317
-
When you take native backups directly to your Blob Storage account, you have to authenticate to the storage account. You can do so by using a SAS token or, if you're on SQL Server 2022, you can also use a managed identity.
318
-
319
-
320
-
321
-
### [SAS token](#tab/sas-token)
317
+
When you take native backups directly to your Blob Storage account, you have to authenticate to the storage account.
322
318
323
319
Use the following command to create a credential that imports the SAS token to your SQL Server instance:
324
320
@@ -331,20 +327,6 @@ SECRET = '<SAS_TOKEN>';
331
327
For detailed instructions working with SAS tokens, review the tutorial [Use Azure Blob Storage with SQL Server](/sql/relational-databases/tutorial-use-azure-blob-storage-service-with-sql-server-2016#1---create-stored-access-policy-and-shared-access-storage).
332
328
333
329
334
-
335
-
### [Managed identity](#tab/managed-identity)
336
-
337
-
SQL Server 2022 has added support for managed identities. If you're on SQL Server 2022, you can authenticate to your storage account by using a managed identity.
338
-
339
-
Use the following command to create a credential that uses the managed identity on your SQL Server instance:
After you've created the credential to authenticate your SQL Server instance with Blob Storage, you can use the [BACKUP TO URL](/sql/relational-databases/backup-restore/sql-server-backup-to-url) command to take backups directly to the storage account. `CHECKSUM` is recommended, but not required.
Copy file name to clipboardExpand all lines: azure-sql/managed-instance/managed-instance-link-feature-overview.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
@@ -28,7 +28,7 @@ The link supports single node SQL Server instances without existing availability
28
28
29
29
The link feature currently offers the following functionality:
30
30
31
-
-**One-way replication (SQL Server versions 2017 to 2019)**: Use the link feature to replicate data one way from a SQL Server instance to your managed instance. Although you can manually fail over to your managed instance if there's a disaster, doing so breaks the link, and failing back isn't supported.
31
+
-**One-way replication (SQL Server versions 2016 to 2019)**: Use the link feature to replicate data one way from a SQL Server instance to your managed instance. Although you can manually fail over to your managed instance if there's a disaster, doing so breaks the link, and failing back isn't supported.
32
32
-**Disaster recovery (SQL Server 2022)**: Use the link feature to replicate data from a SQL Server 2022 instance to your managed instance, manually fail over to your managed instance during a disaster, and fail back to the SQL Server instance after you've mitigated the disaster.
33
33
34
34
This feature is currently in limited public preview. [You must sign up for limited public preview](https://aka.ms/mi-link-dr-preview-signup) so that the product group can configure your environment for the preview.
title: Use SDK-style projects with the SQL Database Projects extension
3
-
description: Getting started using SDK-style SQL projects with the SQL Database Projects extension for Azure Data Studio or VS Code
3
+
description: Getting started using SDK-style SQL projects with the SQL Database Projects extension for Azure Data Studio or Visual Studio Code
4
4
author: dzsquared
5
5
ms.author: drskwier
6
6
ms.reviewer: maghan
7
-
ms.date: 5/24/2022
7
+
ms.date: 2/14/2023
8
8
ms.service: azure-data-studio
9
9
ms.topic: conceptual
10
10
ms.custom: intro-get-started
11
11
---
12
12
13
13
# Use SDK-style SQL projects with the SQL Database Projects extension (Preview)
14
14
15
-
This article introduces [Microsoft.Build.Sql](https://www.nuget.org/packages/Microsoft.Build.Sql) for SDK-style SQL projects in the SQL Database Projects extension in Azure Data Studio or VS Code. SDK-style SQL projects are especially advantageous for applications shipped through pipelines or built in cross-platform environments. The initial announcement is available in [TechCommunity](https://techcommunity.microsoft.com/t5/azure-sql-blog/microsoft-build-sql-the-next-frontier-of-sql-projects/ba-p/3290628).
15
+
This article introduces [Microsoft.Build.Sql](https://www.nuget.org/packages/Microsoft.Build.Sql) for SDK-style SQL projects in the SQL Database Projects extension in Azure Data Studio or Visual Studio Code. SDK-style SQL projects are especially advantageous for applications shipped through pipelines or built in cross-platform environments. The initial announcement is available in [TechCommunity](https://techcommunity.microsoft.com/t5/azure-sql-blog/microsoft-build-sql-the-next-frontier-of-sql-projects/ba-p/3290628).
16
16
17
17
> [!NOTE]
18
-
> The SDK-style SQL projects is currently in preview.
18
+
> Microsoft.Build.Sql is currently in preview.
19
19
20
20
## Create an SDK-style database project
21
21
@@ -29,23 +29,132 @@ By default the selection for **SDK-style project (Preview)** is checked. When th
29
29
30
30
### From an existing database
31
31
32
-
In the **Project** view, select the **Import Project from Database** button and connect to a SQL Server. Once the connection is established, select a database from the list of available databases and set the name of the project. Select a target structure of the extraction.
32
+
In the **Project** view, select the **Create Project from Database** button and connect to a SQL Server. Once the connection is established, select a database from the list of available databases and set the name of the project. Select a target structure of the extraction.
33
33
34
34
By default the selection for **SDK-style project (Preview)** is checked. When the dialog is completed, the new project is opened and contains SQL scripts for the contents of the selected database.
35
35
36
36
## Build and publish
37
37
38
-
From the Azure Data Studio and VS Code interfaces, building and publishing an SDK-style SQL project is completed in the same way as the previous SQL project format. For more on this process, see [Build and Publish a Project](sql-database-project-extension-build.md).
38
+
From the Azure Data Studio and Visual Studio Code interfaces, building and publishing an SDK-style SQL project is completed in the same way as the previous SQL project format. For more on this process, see [Build and Publish a Project](sql-database-project-extension-build.md).
39
39
40
40
To build an SDK-style SQL project from the command line on Windows, macOS, or Linux, use the following command:
41
41
42
42
```bash
43
-
dotnet build /p:NetCoreBuild=true
43
+
dotnet build
44
44
```
45
45
46
-
The `.dacpac` resulting from building an SDK-style SQL project is compatible with tooling associated with the data-tier application framework (`.dacpac`, `.bacpac`), including [SqlPackage](../../tools/sqlpackage/sqlpackage-publish.md).
46
+
The `.dacpac` file resulting from building an SDK-style SQL project is compatible with tooling associated with the data-tier application framework (`.dacpac`, `.bacpac`), including [SqlPackage](../../tools/sqlpackage/sqlpackage-publish.md) and GitHub [sql-action](https://github.com/azure/sql-action).
47
+
48
+
## Project capabilities
49
+
In SQL projects there are several capabilities that can be specified in the `.sqlproj` file that impact the database model either at project build or deployment. The following sections describe some of these capabilities that are available for Microsoft.Build.Sql projects.
50
+
51
+
### Target platform
52
+
The target platform property is contained in the `DSP` tag in the `.sqlproj` file under the `<PropertyGroup>` item. The target platform is used during project build to validate support for features included in the project and is added to the `.dacpac` file as a property. By default, during deployment, the target platform is checked against the target database to ensure compatibility. If the target platform is not supported by the target database, the deployment fails unless an override [publish option](../../tools/sqlpackage/sqlpackage-publish.md) is specified.
The database model validation at build time can be extended past the contents of the SQL project through database references. Database references specified in the `.sqlproj` file can reference another SQL project or a `.dacpac` file, representing either another database or more components of the same database.
74
+
75
+
The following attributes are available for database references that represent another database:
76
+
-**DatabaseSqlCmdVariable:** the value is the name of the variable that is used to reference the database
- Usage example: `SELECT * FROM [$(SomeOtherDatabase)].dbo.Table1`
79
+
-**ServerSqlCmdVariable:** the value is the name of the variable that is used to reference the server where the database resides. used with DatabaseSqlCmdVariable, when the database is in another server.
- Usage example: `SELECT * FROM [$(SomeOtherServer)].[$(SomeOtherDatabase)].dbo.Table1`
82
+
-**DatabaseVariableLiteralValue:** the value is the literal name of the database as used in the SQL project, similar to `DatabaseSqlCmdVariable` but the reference to other database is a literal value
- Usage example: `SELECT * FROM [SomeOtherDatabase].dbo.Table1`
85
+
86
+
In a SQL project file, a database reference is specified as an `ArtifactReference` item with the `Include` attribute set to the path of the `.dacpac` file.
Package references are used to reference NuGet packages that contain a `.dacpac` file and are used to extend the database model at build time similarly as a [database reference](#database-references).
99
+
100
+
The following example from a SQL project file references the `Microsoft.SqlServer.Dacpacs`[package](https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs) for the `master` database.
In addition to the attributes available for [database references](#database-references), the following `DacpacName` attribute can be specified to select a `.dacpac` from a package that contains multiple `.dacpac` files.
SqlCmd variables can be defined in the `.sqlproj` file and are used to replace tokens in SQL objects and scripts during `.dacpac`[deployment](../../tools/sqlpackage/sqlpackage-publish.md#sqlcmd-variables). The following example from a SQL project file defines a variable named `EnvironmentName` that available for use in the project's objects and scripts.
122
+
123
+
```xml
124
+
<ItemGroup>
125
+
<SqlCmdVariableInclude="EnvironmentName">
126
+
<DefaultValue>testing</DefaultValue>
127
+
<Value>$(SqlCmdVar__1)</Value>
128
+
</SqlCmdVariable>
129
+
</ItemGroup>
130
+
</Project>
131
+
```
132
+
133
+
```sql
134
+
IF '$(EnvironmentName)'='testing'
135
+
BEING
136
+
-- do something
137
+
END
138
+
```
139
+
140
+
When a compiled SQL project (`.dacpac`) is deployed, the value of the variable is replaced with the value specified in the deployment command. For example, the following command deploys the `AdventureWorks.dacpac` and sets the value of the `EnvironmentName` variable to `production`.
Pre- and post-deployment scripts are SQL scripts that are included in the project to be executed during deployment. Pre/post-deployment scripts are included in the `.dacpac` but they are not compiled into or validated with database object model. A pre-deployment script is executed before the database model is applied and a post-deployment script is executed after the database model is applied. The following example from a SQL project file adds the file `populate-app-settings.sql` as post-deployment script.
148
+
149
+
```xml
150
+
<ItemGroup>
151
+
<PostDeployInclude="populate-app-settings.sql" />
152
+
</ItemGroup>
153
+
</Project>
154
+
```
47
155
48
156
49
157
## Next steps
50
158
51
159
-[Build and Publish a project with the SQL Database Projects extension](sql-database-project-extension-build.md)
160
+
-[Install SqlPackage for deployment from the CLI](../../tools/sqlpackage/sqlpackage-download.md)
0 commit comments