Builds a database on a server.
The Build task involves building a database package and deploying it on a specific server. This package is typically created from a scripts folder containing SQL or other database-related files.
Note
Before creating the Build task, build an Azure pipeline.
To create the Build task:
1. Click Add a task to Agent job.

2. In the search box, enter the extension name, for example, dbforge.

3. Select dbForge DevOps Automation for SQL Server – Build and click Add.

4. Specify the location of your database source project.
5. Specify the server name, database name, and connection parameters.

6. To verify the settings, click Save & queue.
7. Open the pipeline execution log to verify the configuration.
A green icon in the execution log indicates successful task completion.

The table provides a list of options you can customize for the Build task.
| Name | Description |
|---|---|
| Database folder | Specify the location of the database source project: repository root directory or subfolder. |
| SQL Server | Enter the target database server, for example, SERVERNAME\INSTANCENAME. For a local default instance, use (local). |
| Database | Enter the target database name. |
| Authentication method | Select the authentication method. |
| User Name | Enter the login name you want to use for the SQL Server authentication. |
| Password | Enter the password you want to use for SQL Server authentication. |
The table provides a list of additional options you can configure for the Build task.
| Name | Description |
|---|---|
| Schema Compare options | Specify the additional schema comparison options. |
| Schema Compare filter | Specify the full path to an alternative filter file which will be used for validating the schema to override the .scflt filter file present in the input. |
| Control Options > Enabled | Select the checkbox to turn on the task in your pipeline. If the task is turned off, it will be skipped during the pipeline execution. |
| Continue on error | Select to continue the pipeline running even if this task fails. |
| Number of retries if task failed | Specify the number of retries for this task that will happen in case of task failure. Note: This requires agent version 2.194.0 or later. Not supported for agentless tasks. |
| Timeout | Specify the maximum time, in minutes, that a task is allowed to execute before being canceled by server. A zero value indicates an infinite timeout. |
| Run this task | Specify when this task should run. Select Custom conditions to specify more complex conditions. The available options are:
|
The table provides output variables you can configure for the Build task.
| Name | Description |
|---|---|
| Reference name | Any changes to the reference name will require updates to downstream tasks that use this reference name, a valid reference name can only contain a-z, A-Z, 0-9 and _. |