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/pipelines/targets/azure-sqldb.md
+35-27
Original file line number
Diff line number
Diff line change
@@ -253,19 +253,20 @@ For Classic release pipelines, select **Start with an empty pipeline**, link the
253
253
254
254
* * *
255
255
256
-
## Deploying conditionally
256
+
## Deploy database conditionally
257
257
258
-
You may choose to deploy only certain builds to your Azure database.
258
+
You can choose to deploy only specific builds to your Azure database, giving you more control over which changes are applied based on criteria like the source branch or build status.
259
259
260
260
#### [YAML](#tab/yaml/)
261
261
::: moniker range="<=azure-devops"
262
262
263
263
To do this in YAML, you can use one of these techniques:
264
264
265
-
* Isolate the deployment steps into a separate job, and add a condition to that job.
266
-
* Add a condition to the step.
265
+
* Isolate the deployment steps into a separate job and apply a condition to that job.
267
266
268
-
The following example shows how to use step conditions to deploy only those builds that originate from main branch.
267
+
* Add a condition directly to the step.
268
+
269
+
The example below shows how to deploy only builds from the main branch using [conditions](../process/conditions.md):
269
270
270
271
```yaml
271
272
- task: SqlAzureDacpacDeployment@1
@@ -279,31 +280,28 @@ The following example shows how to use step conditions to deploy only those buil
279
280
DacpacFile: '<Location of Dacpac file in $(Build.SourcesDirectory) after compilation>'
280
281
```
281
282
282
-
To learn more about conditions, see [Specify conditions](../process/conditions.md).
283
-
284
283
::: moniker-end
285
284
286
285
#### [Classic](#tab/classic/)
287
286
288
-
In your release pipeline, you can implement various checks and conditions to control the deployment.
287
+
With Classic release pipelines, you can implement various checks and conditions to control when and which deployments are triggered. Here are some strategies you can use:
289
288
290
-
> [!NOTE]
291
-
> In some setups, you might need to allowlist the range of IP addresses for the specific region that is updated in the [weekly JSON file](https://www.microsoft.com/download/details.aspx?id=56519). Learn about [networking Microsoft-hosted agents](../agents/hosted.md#networking).
289
+
* Use branch filters to set up your [continuous deployment triggers](../release/triggers.md#predeployment-approvals) to trigger a release whenever a new build from a specific branch becomes available.
292
290
293
-
* Set **branch filters** to configure the **continuous deployment trigger** on the artifact of the release pipeline.
294
-
* Set **pre-deployment approvals** as a pre-condition for deployment to a stage.
295
-
* Configure **gates** as a pre-condition for deployment to a stage.
296
-
* Specify conditions for a task to run.
291
+
* Use [pre-deployment approvals](../release/approvals/approvals.md#predeployment-approvals) to designate approvers who can either approve or reject deployment to a specific stage.
297
292
298
-
For more information, see [Release, branch, and stage triggers](../release/triggers.md), [Release deployment control using approvals](../release/approvals/approvals.md), [Release deployment control using gates](../release/approvals/gates.md), and [Specify conditions for running a task](../process/conditions.md).
293
+
* Define a set of [gates](../release/deploy-using-approvals.md#set-up-gates) to ensure that the release pipeline meets specific criteria before deployment without requiring user intervention.
294
+
295
+
> [!NOTE]
296
+
> In some scenarios, you might need allowlist the IP address range for the specific region, which is updated in the [weekly JSON file](https://www.microsoft.com/download/details.aspx?id=56519). See [networking Microsoft-hosted agents](../agents/hosted.md#networking) for more details.
299
297
300
298
* * *
299
+
301
300
## More SQL actions
302
301
303
-
**SQL Azure Dacpac Deployment** may not support all SQL server actions
304
-
that you want to perform. In these cases, you can simply use PowerShell or command-line scripts to run the commands you need.
305
-
This section shows some of the common use cases for invoking the [SqlPackage.exe tool](/sql/tools/sqlpackage-download).
306
-
As a prerequisite to running this tool, you must use a self-hosted agent and have the tool installed on your agent.
302
+
The SQL Azure Dacpac Deployment task might not cover all the SQL server actions you need to perform. In such cases, you can use PowerShell or command-line scripts to execute the required commands.
303
+
304
+
This section covers common use cases for invoking the [SqlPackage.exe tool](/sql/tools/sqlpackage-download). Before running this tool, make sure you're using a self-hosted agent with the tool installed.
307
305
308
306
> [!NOTE]
309
307
> If you execute **SQLPackage** from the folder where it is installed, you must prefix the path with `&` and wrap it in double-quotes.
@@ -312,9 +310,9 @@ As a prerequisite to running this tool, you must use a self-hosted agent and hav
312
310
313
311
`<Path of SQLPackage.exe> <Arguments to SQLPackage.exe>`
314
312
315
-
You can use any of the following SQL scripts depending on the action that you want to perform
313
+
You can use any of the following SQL scripts based on the action you wish to perform:
316
314
317
-
###Extract
315
+
#### [Extract](#tab/extract/)
318
316
319
317
Creates a database snapshot (.dacpac) file from a live SQL server or Microsoft Azure SQL Database.
Incrementally updates a database schema to match the schema of a source .dacpac file. If the database doesn’t exist on the server, the publish operation will create it. Otherwise, an existing database will be updated.
0 commit comments