Compare just a single table via the command line

Compares and synchronizes SQL database content.

Moderators: Chris Auckland, David Atkinson, richardjm, david connell

Compare just a single table via the command line

Postby troyhunt » Wed Aug 03, 2011 3:06 am

I'm struggling with something which should be very basic but I'm just not sure what I'm missing. I have two DBs from which I want to compare just a single table via the command line. I'm presently running this command:

SQLDataCompare.exe" /s1:(local) /db1:DB1 /s2:(local) /db2:DB2 /Include:table:\\[MyTable\\] /v

However, every common table in the DBs are compared (I think I'm probably misinterpreting the "include" switch as a whitelist). What am I missing here?

BTW, this is with the current version, 9.0.0.117
troyhunt
 
Posts: 15
Joined: Sun Nov 28, 2010 3:36 am
Location: Australia

Postby Chris Auckland » Wed Aug 03, 2011 9:29 am

Hi Troy,

I'm afraid your syntax is correct and this is a bug with SDC 9.0 (bug ref: SDC-1243). The /include switch doesn't seem to work.

There are a few workarounds you could use for the time being:

1) Create a project in the GUI, and then reference the project file using /project switch
2) The /exclude switch still works, so you could exclude the tables you don't want.
3) Downgrade to SQL Data Compare 8

I hope this helps for now, and sorry for the inconvenience.

Regards,

Chris
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.

Postby danere » Wed Aug 03, 2011 10:13 am

You could also try writing a negative regular expression for the /Exclude parameter as a workaround, e.g. exclude all except this table name string. I just had a bash at this but kept getting tripped up by reserved characters on the command line, so that might be fiddly to get right.

Dan
danere
 
Posts: 3
Joined: Thu Aug 12, 2010 9:17 am
Location: Sydney, Australia

Re:

Postby troyhunt » Fri Aug 05, 2011 6:32 am

Chris Auckland wrote:
1) Create a project in the GUI, and then reference the project file using /project switch
2) The /exclude switch still works, so you could exclude the tables you don't want.


Unfortunately number 1 is throwing the same exception against this syntax: SQLDataCompare.exe /pr:MyCompareFile.sdc

And number 2 would be rather unpleasant given the number of tables in the DB.

Any word on the timeline for a fix?
troyhunt
 
Posts: 15
Joined: Sun Nov 28, 2010 3:36 am
Location: Australia

Postby justin.caldicott » Fri Aug 05, 2011 9:57 am

Hello Troy,

Just to say that we've fixed the problem. We're just waiting on test resource before shipping you a private copy.

Justin
justin.caldicott
 
Posts: 55
Joined: Wed Apr 20, 2011 5:42 pm

Postby Jaykul » Fri Aug 19, 2011 7:18 pm

Can I just say: holy cow what a HUGE bug ... when can we get a fix? This totally blocks the new toolbelt release for us.
Jaykul
 
Posts: 1
Joined: Fri Aug 19, 2011 7:16 pm

Postby peter.peart » Tue Aug 23, 2011 4:26 pm

There's now a patch release to fix this available from the below link:

ftp://support.red-gate.com/patches/SQL_ ... 173469.exe

HTH!

Pete
Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
peter.peart
Site Admin
 
Posts: 362
Joined: Tue Sep 02, 2008 9:58 am
Location: Top floor, RG towers with the cool kids

Postby troyhunt » Sun Aug 28, 2011 8:17 am

Beautiful, thanks Peter, the patched version is working just fine.
troyhunt
 
Posts: 15
Joined: Sun Nov 28, 2010 3:36 am
Location: Australia


Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests