disregard and don't delete items in dest db not in source ?

GandalfGandalf Posts: 6
edited January 5, 2010 2:38AM in SQL Compare Previous Versions
How can I tell the SQL Compare not to delete items in the object sync script, when the object is in the destination db but not in the source db ?

Comments

  • Michelle TMichelle T Posts: 566 Gold 1
    There isn't an overall option for this yet (it's on our list of feature requests and I've added this forum thread to the feature request).

    If you're using the UI, the easiest way to do this is to group by type of difference, then right-click on the 'objects that exist only in <destination database>' heading and select 'Exclude All Objects in this Group'.
    Software Developer
    Redgate Software
  • Gandalf,

    Can I ask whether exactly what you are looking for here? Are you referring to the command line or the UI?

    Do you want only 'new' objects to be added to the target, or do you also want 'different' objects to be synchronized?

    Also, would you want this to be a global option, or something that must be set on a per-object-type basis?

    Thanks,

    David Atkinson
    Product Manager
    Red Gate Software
    David Atkinson
    Product Manager
    Redgate Software
  • I've already followed Michelle's instructions but the problem I'm running into is that Red Gate wants to delete all the CREATE STATISTICS objects in the destination database.

    It isn't placing them in the objects that exist only in the destination database section.
  • Is there a way I can edit the delta script generated by RedGate before it runs?
  • Michelle TMichelle T Posts: 566 Gold 1
    If you're using the UI, you can tell SQL Compare to run QA or SSMS with the script loaded rather than running the script itself (it's a radio button option on the last page of the synchronization wizard, and you can change which program it's trying to run from Application Options).

    If you're using the command line or the API, you can write the script out to a file instead of running it directly, allowing you to modify it before running it. The command line uses the /scriptfile option to do this. Using the API there are a range of methods on an ExecutionBlock for getting the script out in a variety of formats.

    The Ignore Statistics option may also help you.
    Software Developer
    Redgate Software
  • Hi there,

    Regarding to the feature of "disregard and don't delete items in destination db not in source" described previously. Is there new version of SQL Data Compare which includes that feature?
    I am using SQL Data Compare 7.

    Thank you.
Sign In or Register to comment.