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 the Add build step button. 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
Build runner is a part of TeamCity that allows integration with a specific build tool. Select dbForge DevOps Automation for SQL Server - Build here.
Optional: Specify the step name to distinguish it from other steps.
Specify the step execution policy. Here you can select from the following options:
Always, even if build stop command was issued
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.
Enter the name of the target database.
Select the authentication method to use: Windows authentication or SQL Server authentication.
Advanced options
Specify additional Schema Compare options.
Select transaction isolation level.
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.