How to avoid altering/dropping columns in target database?
rdp2n
Posts: 3
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
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
Comments
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.
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?
Thanks,
Rob