How to do one way sync of data using CLI
DanAvni
Posts: 72 Bronze 2
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?
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
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...
Redgate Software