Data Compare incorporates a built-in command-line Wizard that converts the project comparison and synchronization options into command-line syntax and saves it as a *.bat file.
It is a very convenient feature for scheduling or automating database comparison and synchronization. You can then use the *.bat file with a script and Windows Task Scheduler or any other Task Scheduler tool to schedule the database comparison or synchronization.
You can select command-line file settings to manage *.bat file text in the Command line execution file settings window. You can open the window by clicking Save Command Line in:
The command-line Wizard has the following options:
Option | Description |
---|---|
Comparison Project | You can use this option to load command-line settings from the *.scomp project file. |
Source | The option helps you to specify the source for comparison, including server name, connection details, user name, password, and a source type. |
Target | The option allows you to specify the target for comparison, including server name, connection details, user name, password, and a target type. |
Comparison Options | You can use this option to set options to manage the comparison process. |
Report | The option helps to specify the format and a path to a report file. |
Log File | You can use this option to define whether to generate a log file on comparison or synchronizations and specify a path to it. |
Synchronization | With this option, you can select to launch a database synchronization, configure its settings, and specify a path to the synchronization file. |
Error code | You can use this option to enable the processing of error levels. |
Arguments File | If you specify a path to the arguments file, the program will generate a separate command-line file. |
After you set the required options for the potential script, you can click Validate to check the accuracy of the code.
If the syntax is valid, you’ll receive the following message:
Otherwise, you’ll see a warning message describing what is wrong.
To save the validated script as a *.bat file, click Save and specify a path to its location.