Redgate SQL Compare XML Syntax INCLUDE Syntax

Compares and synchronizes SQL database content.

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

Redgate SQL Compare XML Syntax INCLUDE Syntax

Postby lc6529 » Mon Jun 03, 2013 1:42 pm

I am trying to compare a table that exists in separate databases on two different servers.

Table 1 is the master, there is a job that will truncate all data once a week and then repopulate it.

Table 2 exists on a production server.

My comparison goal is to compare table 1 to table 2 and only ADD new records or MODIFY existing records and do nothing when the tables are identical.

I can do this through a command line argument and I when I pipe the results to a text file I can see if records were added, modified or both tables are identical.

I would like to use an XML argument file, but when I do so I get the message Error: The selected objects are identical or no objects have been selected in the comparison.

My command line looks like this:

sqldatacompare /Argfile:Compare_Tables.xml

I know my XML file is correct in the setup for the servers, databases and passwords. The area I am having issues with is the INCLUDE statements.

I have tried:

<include>Table:\\[LABELFORMATS\\]Identical, Missing, Different</include>


<include>Identical, Missing, Different</include>

Can anyone assist please?
Posts: 20
Joined: Wed Apr 18, 2007 7:32 pm

Postby Brian Donahue » Mon Jun 03, 2013 2:18 pm

With the command-line, you can do /Include:Missing globally, but you cannot apply that on a per-table basis. You should just use <Include>Missing</Include> as one of the XML elements to include all missing records.
Brian Donahue
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Follow Up

Postby lc6529 » Mon Jun 03, 2013 2:27 pm

Yes that seemed to work!

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