user922161
user922161

Reputation: 69

How Do I Automate Database Schema comparison and Synchronization Process for SQL Server Database?

I am using SQL Compare(from Redgates) to compare Sql server Database schema comparison. And I know how to Synchronize it manually.

Is there any process which I can make.. which automatically compares database1 schema with Database2 schema and make synchronization. And this has to be scheduled weekly once..

Upvotes: 2

Views: 2256

Answers (3)

xSQL Software
xSQL Software

Reputation: 156

You can use xSQL Softwares's Schema Compare tool which comes with a command line utility or if you wish to integrate the database schema comparison and synchronization into your own code you can use the Schema Compare SDK. The xSQL Schema Compare tool is free for SQL Server Express whereas the SDK is not free.

Upvotes: 2

Chris Townsend
Chris Townsend

Reputation: 3162

It is worth noting that SQL Compare Pro has command line tools for continuous integration. That may be an easy option considering you already have the tool and it should be an easy exercise to automate the command line options.

Upvotes: 0

Adam G
Adam G

Reputation: 35

Theres a few ways you could to this:

Custom msbuild script to compile & deploy the database via the Release configuration. A script is generated via the msbuild process and can be executed.

If you are using a CI server (such as CCnet) you can configure the relevant type of task (in CCNet, you configure a msbuild task)

You would also be able to use powershell to call the msbuild funcutions.

CCNet Config

MSBuild Reference

Good Luck :)

Upvotes: 0

Related Questions