Chat now with support
Chat with Support

Automatically comparing and synchronizing SQL Server database schema changes (302216)


Feedback submitted.

Was this article helpful?

  [Select Rating]

Automating the schema synchronization process

Since automating process for building a new database from a source control repository is explained in article: How to deploy changes directly to a SQL database from a source control repository, the part for schema synchronization of the new database with an existing QA database should be added to the sequence, in order to have the whole process for the sync step when there are only schema changes in the source control repository.

The part that should be added is:

# calling a 3rd party application

# the application’s path


# the path for the ApexSQL Diff project file


# executes the synchronization script


# prints all messages in console


# overwrites an existing build script


# redirects console output to specified file

@echo ApexSQL Diff return code is %errorlevel% >> /out:output.txt

# specifies a return code upon finished build process

Find out more about ApexSQL Diff’s CLI switches from an article on this: ApexSQL Diff Command Line Interface (CLI) switches.

If for any reason, the synchronization process fails, due to the Transaction handling option, all changes will be reverted back and no changes will be applied to a QA database.


Feedback submitted.

Was this article helpful?

  [Select Rating]

Request or Create a KB Article »

Leave a Comment

Must select 1 to 5 star rating above in order to send comments
Recommended Content
ApexSQL Compare
ApexSQL DevOps Toolkit
How To
Article History:
Created on: 7/1/2019
Last Update on: 7/1/2019
Kona Praveen Kumar Reddy
Search All Articles