The Sync step

Synopsis

Runs specified SQL scripts in the pipeline.

Description

The Sync step involves comparing the database schema and data with the source package, identifying differences, and applying the necessary changes to bring the target database up to date.

How to create the Sync 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 – Sync. After that, the user interface for the Sync 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

  • Package ID

Enter the ID of the package that you want to use to update the target database. The ID must be for a package built by dbForge DevOps Automation for SQL Server.

  • Target database

  • 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

  • Schema Compare options

Specify additional Schema Compare options.

  • Transaction isolation level

Select transaction isolation level.

  • Schema Compare filter

Specify a path to an alternative filter file which will be used for validating the schema to override *.scflt filter file present in the input.

Note

The Sync step does not allow you to perform a comparison without automatically synchronizing the source and target databases. When executed, the Sync step by default triggers the synchronization process. To obtain a comparison report without synchronizing, you may consider using the dbForge Schema Compare Pro or dbForge Studio for SQL Server Ent or Pro command line instead, and omitting the /sync switch. For example:

"C:\Program Files\Devart\dbForge SQL Tools Professional\dbForge Schema Compare for SQL Server\schemacompare.com" /schemacompare /source connection:"Data Source=DESKTOP-9NIVJ84\SQLSERVER2022;Initial Catalog=A1;Integrated Security=True;User ID=DESKTOP-9NIVJ84\1" /target connection:"Data Source=DESKTOP-9NIVJ84\SQLSERVER2022;Initial Catalog=A2;Integrated Security=True;User ID=DESKTOP-9NIVJ84\1" 

If you require customized solutions in your DevOps pipeline, the dbForge tool command line offers a flexible alternative that can be tailored to your specific needs. By using this method, you can configure the command line according to your tasks, and execute the dbForge tool with the required options and parameters.

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?