Schema Compare incorporates a built-in Command Line Wizard that allows converting the project’s comparison and synchronization options into command-line syntax and save it as a *.bat file.
It is a very convenient feature when it comes to scheduling or automating database comparison and synchronization. You can then use a *.bat file with a script and Windows Task Scheduler or any other task scheduler tool available 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 the Save Command Line button in:
The command line wizard has the following options:
Option | Description |
---|---|
Comparison project | You can use this option to load command line settings from *.scomp project file |
Source | The option helps to specify the source for comparison, including server name, connection details, user name, password, and a source type |
Target | The option helps 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 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 as well as specify a path to it |
Synchronization | With this option you can select to launch a database synchronization, configure its options, and specify a path to 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 setting the required options for the potential script, you can click Validate to check the accuracy of the code.
If the syntax is valid, you receive the following message:
Otherwise, the correspondent warning will be displayed:
After validating the code, you can save the script as a *.bat file by clicking the Save button and specifying a path to its location.