How to avoid altering/dropping columns in target database?

Forum for users of SQL Compare schema synchronization utility

How to avoid altering/dropping columns in target database?

Postby rdp2n » Wed May 29, 2013 7:32 pm

I'm just trying out SQL Compare, I've compared 2 DBs and would like to deploy. However:
Of those (N=461) "objects that exist in both but are different" I would like to avoid those updates where the target objects (e.g. columns) are dropped or modified. For example, in the bottom pane these appear with a red x next to them. How can I ensure that none of these are dropped in the deployment?

-- Thanks, Rob
Posts: 2
Joined: Wed May 29, 2013 7:18 pm

Postby Brian Donahue » Mon Jun 03, 2013 9:34 am

Hi Rob,

This looks pretty easy to do - just group objects by their status (only in 1/different/only in 2) and check the checkbox in the header of the objects that only exist in database 2 so that all of those objects are deselected. Then use the deployment wizard to synchronize the selected objects. That should stop and objects from being dropped.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Postby rdp2n » Thu Mar 13, 2014 3:27 pm

In our case, though we want to transfer all the changes from the source to the target WITHOUT DROPPING anything from the target -- just adding in our modificiations. For example, we have scores of tables which exist in both source and target, that have columns from the source that we want to add to the target. However, on those same tables we have columns in the target that don't exist in the source that we want preserved. These are marked with a red x and I can't see a convenient way to exclude these from being dropped in the deployment (other than writing a perl program to edit out the DROPs in the deployment script??).

So, for this application, we don't want a perfect DB synchronization source<->target -- what we need is to leave the target structure essentially untouched, just adding/inserting any objects (i.e. table columns) that exist in the source but not in the target. When it comes to the tables it seems to me that it's an all or nothing proposition. I can't see how to prevent target columns from being dropped whether using Tools->Options, or custom filters/rules.

So I'm stumped -- can anyone suggest what I might be missing?


Posts: 2
Joined: Wed May 29, 2013 7:18 pm

Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests