How to do one way sync of data using CLI

DanAvniDanAvni Posts: 65 Bronze 2
edited February 23, 2015 6:41AM in SQL Data Compare 11
I have two databases:
one is live data and is holding data for 3 month
the other should hold parts of the data as an archive.

I need to do one way sync from live->archive using CLI but I do need the following:
1. only new/updated rows should be synced deleted rows on the live DB should not sync
2. I need to be able to specify where clause because not all live data should be synced

How can I do this using CLI?
Dan Avni

Comments

  • Hi Dan,

    1. If you use the command line switches /Include:Missing /Include:Different it will only synchronize the rows that are not present in the target database. Rows that are only in the target database will not be dropped.

    2. To use a WHERE clause in the command line you would need to save it in a project file. You can reference a project file when using the command line by using the following syntax...
    sqldatacompare.exe /Project:"C:SQLCompareProjectsWidgets.sdc"
    
    Software Engineer
    Redgate Software
Sign In or Register to comment.