MS SQL Data Sync online Help
Prev | Return to chapter overview | Next |
Command line options
MS SQL Data Sync supports a number of command line options that make it possible to fully automate database comparison and synchronization. To generate the command line automatically, load the project to be used or specify the comparison options and click More > Generate command line. To log the synchronization process, check the corresponding option and set the Log file name.
The MS SQL Data Sync command line syntax is as follows:
MyDataSync[.exe] -sd|sync_db | -ss|sync_script <synchronization_script_file_name>
<project_file_name> [-c|console] [-l|log <log_file_name>] [-ig|ignore_case]
[-is|ignore_trailling_spaces] [-h|help] [-u|update] [-i|insert] [-d|delete]
MyDataSync[.exe] |
The MS SQL Data Sync program file. |
<project_file_name> |
The project with all the task's settings. |
-c|console |
Runs the wizard in console mode. This option is required. |
-sd|sync_db |
Specifies whether the wizard have to synchronize data immediately. |
-ss|sync_script |
Sets the wizard to save the synchronization script to a file, requires the script file name. |
-l|log |
Enables logging, requires the log file name. |
-ig|ignore_case |
Sets the wizard to ignore case in strings on data comparison. |
-is|ignore_trailling_spaces |
Specifies the wizard to ignore trailing and leading spaces on data comparison. |
-h|help |
Shows help information. |
-u|update -i|insert -d|delete |
Specify whether the wizard will only update target records, insert missing records into target table, or delete rows existing in the target table but not in the source one. If none of these options is specified all differences will be synchronized. |
Note: One of sync_db and sync_script is required.
Examples
The examples below assume that you are entering the command lines in the MS SQL Data Sync program directory. Don't forget to enclose all paths and filenames containing spaces in quotes.
• | "C:\Program Files\SQL Maestro Group\Data Sync for MySQL\MyDataSync.exe" "D:\Templates\mysql_dtsync_sakila.mydsp" -ignore_case -ignore_trailling_spaces -sync_db -console |
• | "C:\Program Files\SQL Maestro Group\PostgreSQL DataSync\PgDataSync.exe" "D:\Templates\postgresql_books.pgdsp" -sync_script "C:\Scripts\PostgreSQL\books_sync.sql" -console |
• | "C:\Program Files\SQL Maestro Group\Data Sync for MySQL\MyDataSync.exe" "D:\Templates\mysql_nba_upd_ins.mydsp" -sync_db -console -update -insert |
Prev | Return to chapter overview | Next |