Red Gate forums :: View topic - How to avoid altering/dropping columns in target database?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

How to avoid altering/dropping columns in target database?

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
rdp2n



Joined: 29 May 2013
Posts: 2

PostPosted: Wed May 29, 2013 8:32 pm    Post subject: How to avoid altering/dropping columns in target database? Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6577

PostPosted: Mon Jun 03, 2013 10:34 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
rdp2n



Joined: 29 May 2013
Posts: 2

PostPosted: Thu Mar 13, 2014 4:27 pm    Post subject: Reply with quote

Hmmm...
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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group