Red Gate forums :: View topic - Redgate SQL Compare XML Syntax INCLUDE Syntax
Return to www.red-gate.com RSS Feed Available

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

Redgate SQL Compare XML Syntax INCLUDE Syntax

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



Joined: 18 Apr 2007
Posts: 20

PostPosted: Mon Jun 03, 2013 1:42 pm    Post subject: Redgate SQL Compare XML Syntax INCLUDE Syntax Reply with quote

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>
<synchronize/>
</commandline>

And

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

Can anyone assist please?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6645

PostPosted: Mon Jun 03, 2013 2:18 pm    Post subject: Reply with quote

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



Joined: 18 Apr 2007
Posts: 20

PostPosted: Mon Jun 03, 2013 2:27 pm    Post subject: Follow Up Reply with quote

Yes that seemed to work!

Thanks!
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