Is it possible to exclude specific columns from a comparison

jheidtjheidt Posts: 11
edited April 8, 2008 8:34AM in SQL Compare Previous Versions
I have an interesting situation, and I figured I would try to get some help here before contacting RG support.

We have what could most easily described a distributed database system, in that system some of our clients have a type of replication from their server to ours. We maintain a master schema for our software, and are trying to use Red Gate's products to manage schema updates and deployment. For the most part the tools have been a boon to us here, and I personally love working with them. I have automatic maintenance scripts that check in the schema of our master copy and put it in source control, etc.

However, I have run into a interesting situation, and heres the crux of it:
In our client-server 'replication' system, we have (on SOME of our customer's databases/tables) 2 columns. One is a GUID and one is a bit, these columns are only on tables that should be replicated to our master server and also ONLY appear on customers who have that option with us. The problem is now occuring, however, that I can't do automated schema deployment the way I was planning on doing it (command line automation with some snapshot files auto deploying to our customers servers), due to the fact that not all of the systems have truely the same schema. Not all of our customers have the replication options turned on, but may in the future. So the GUID column lets us globally key a row in our entire database system, and the bit column tells the replication mechanisms that the row has been replicated, I hope I am describing this sufficiently.

So, I can't really use SQL Compare as it is now to deploy our schema, due to the internal workings of the replication mechanisms, we need to use default values on the GUID col, and the bit columns. By putting these columns on tables of customer's databases who don't have this option with use, we would break the future implimentation of the replication mechanisms should they choose to desire them later.

I would like to compare our clients snapshots to our master schema server, and generate schema updating scripts that ignore the presence, or absence of these columns, named XXX and YYY for simplicity's sake. If the regex CLI option exists for this (I didn't see it mentioned in the sparse documentation) what is the syntax? If not, is there any way to accomplish what I am trying to do here?


  • SQL Compare doesn't currently provide any functionality to ignore individual columns - the lowest level of granularity you can get when ignoring database objects is entire tables.

    I've attached this forum post to the feature request for the feature 'treat columns as seperate objects'. It's something we've been considering (along with similar changes such as treating indexes, triggers and constraints as seperate objects) for some time now, but it would require quite considerable architectural changes to our code.
    Software Developer
    Redgate Software
Sign In or Register to comment.