The Execute step

Synopsis

Runs specified SQL scripts in the pipeline.

Description

The Execute step allows for the flexible execution of SQL scripts, which can be used for a variety of purposes, such as to create a new database from custom scripts, execute migration scripts to update an existing database, or add unit tests for an already deployed database.

How to create the Execute task

To add the step, go to the Build Steps section in the settings of your project and click Add build step. Then in the drop-down list that appears, select dbForge DevOps Automation for SQL Server – Execute. After that, the user interface for the Execute step will be displayed.

Customization options

  • Runner type

Build runner is a part of TeamCity that allows integration with a specific build tool. Select dbForge DevOps Automation for SQL Server - Build here.

  • Step name

Optional: Specify the step name to distinguish it from other steps.

  • Execute step

Specify the step execution policy. Here you can select from the following options:

  • If all previous steps finished successfully
  • Only if build status is successful
  • Even if some of the previous steps failed
  • Always, even if build stop command was issued

  • Files to execute

Specify a path to a SQL or ZIP file with the script to execute or a folder with SQL or ZIP files. If a path refers to a folder, the scripts are executed in alphabetical order (subfolders are ignored).

  • Target database to execute

  • Server

Enter the name of the target server, e.g., SERVERNAME\INSTANCENAME.

  • Database

Enter the name of the target database.

  • Authentication method

Select the authentication method to use: Windows authentication or SQL Server authentication.

Advanced options

  • Encoding

Select the encoding to be used to open and execute the script.

  • Zip Password

Enter a password to the protected archive file.

  • Ignore Error

Select to allow scripts execution to continue despite errors.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge DevOps Automation for SQL Server.
Request a demo

Request a demo

If you consider employing the DevOps Automation for your business, request a demo to see it in action.
Ready to start using dbForge DevOps Automation for SQL Server?