LINKS  

ApexSQL Knowledgebase

Tips and How-to Articles for ApexSQL Tools


How to compare and synchronize databases using ApexSQL Diff CLI

APPLIES TO
ApexSQL Diff 2010 and below

SUMMARY

This article describes how to compare and synchronize the test and production databases using ApexSQL Diff Command Line Interface.
Note that you can work with ApexSQL Data Diff Command Line Interface seamlessly.

To illustrate our example we use:
• two servers: TESTSRV and PRODSRV,
• two databases: TESTDB and PRODDB.
• two logins/passwords: testsa/testpass to connect to TESTSRV and prodsa/prodpass to connect to PRODDB.

DESCRIPTION
1. Open Command line prompt from the ApexSQL Diff installation folder (i.e. C:\Program Files\ApexSQL\ApexSQLDiff2010.
2. The command that starts a synchronization of a testing database with a production database can be written as follows:

ApexSQLDiff.com /s1:PRODSRV /d1:PRODDB /u1:prodsa /p1:prodpass
/s2:TESTSRV /d2:TESTDB /u2:testsa /p2:testpass
/sync /f

To get familiar with all possible command line switches type in the following:
ApexSQLDiff.com /? /out:out.txt /f

The out.txt file will contain the switch set along with the descriptions.

SEE ALSO
How to schedule CLI command execution with SQL Server
How to schedule CLI command execution with Windows Scheduler

Posted by
Anna Lesniak

LAST UPDATED
June 6, 2010

Labels: ,



© 2010 ApexSQL LLC All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use | Privacy Policy