SQL Data Compare - Exclude Rowguid From Comparison

Compares and synchronizes SQL database content.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

SQL Data Compare - Exclude Rowguid From Comparison

Postby lc6529 » Mon Jun 03, 2013 5:58 pm

Getting Closer.

I have setup an XML Argument file to compare two tables on two different servers and put the output of the comparison into a log file.

The tables are identical except for 2 things.

#1: The table on server 1 has a job run against it that will delete all data from the table and repopulate it.

#2: The table on server 2 is replicated out using MERGE replication to servers in different countries.

The table on server 2 would have issues if it were blank, so my XML simply adds new records or updates existing records. All was going fine in testing until we added replication to the mix. Now SQLDataCompare is not working due to the ROWGUID column.

I tried using <excludecolumns>rowguid</excludecolumns>

But that did not work

How do I exclude this column in my comparison?

Here is a sample of my XML. Is this correct?

<!-- Compare These Tables -->
<include>Table:\\[Critical_Tables\\]</include>
<!-- Exclude This Column -->
<excludecolumns>rowguid</excludecolumns>
<!-- Do These Comparisons -->
<include>Identical</include>
<include>Missing</include>
<include>Different</include>
<synchronize/>

Update:

I have gotten further, I have found out that this syntax works:

<excludecolumns>\\[Critical_Tables\\]:rowguid</excludecolumns>

However I get "object not set to a reference" when I run my program from the command line using the XML file.

I should point out that rowguid is ONLY in the table on the 2nd server and not in the table on the 1st server.
lc6529
 
Posts: 20
Joined: Wed Apr 18, 2007 7:32 pm

Return to SQL Data Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests