Solutions Products Download Purchase Support News Members Company
SITE FEED
Support Forum
The fastest and most effective to get answers to your questions quickly.
FAQs
Quick answers to common questions.
Troubleshooting
Known issues and basic troubleshooting techniques for problems or unexpected behaviors.
Knowledgebase
Technical tips, How-to articles, and other tutorials about ApexSQL Tools.
Online Documentation
All of our help files for download or convenient viewing online.
Videos
Watch product demos, training videos, or tutorials of our products' main features. 

ApexSQL Knowledgebase

Tips and How-to Articles for Apex SQL Tools


How to compare and synchronize databases using ApexSQL Diff CLI

DESCRIPTION
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.

SOLUTION
1. Open Command line prompt from the ApexSQL Diff installation folder (i.e. C:\Program Files\ApexSQL\ApexSQLDiff2008.
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

AUTHOR
Anna Lesniak

LAST REVIEW DATE
19 February 2009

Labels: ,



© 2010 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use | Privacy Policy