Update no Delete

andrewleetechandrewleetech Posts: 6
edited March 27, 2015 7:12PM in SQL Data Compare 11
Hello,

We have database a that we sync to database b every hour. We use the command line to do this as a scheduled task. Issue we are running into is if data is removed from database a its being removed from database b. We can not seem to find a way using command line to stop this. We would like the sync to only add new rows or update existing rows the sync never needs to remove anything.

Please let me know if there is a way to set this out with the command line.

Comments

  • You should be able to do this using the option
    /exclude:Additional
    

    See the command line documentation for more details.
    Development Lead
    Redgate Software
  • Would that still update new rows that are in the source but not that target?

    Looking at documentation it sounds like it would only update rows that are already in the target.
  • It's an exclude filter, so it's telling Data Compare what to ignore - i.e. ignore rows that are only in the target, so it won't perform its normal operation on those rows which would be to delete them. It will still add new rows from the source to the target, because you haven't told it to ignore those (the option to ignore those would be /exclude:Missing).

    It's certainly not the simplest thing to understand (or to explain), but it should do what you want.
    Development Lead
    Redgate Software
  • Hello,

    Thanks we got this working using the /exclude:additional command

    You might want to updated your documentation. It says that /exclude and /include do not work with /project but testing your feedback it does work.
Sign In or Register to comment.