Compare just a single table via the command line

troyhunttroyhunt Posts: 17 Bronze 3
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

Comments

  • 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
  • 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

  • 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?
  • 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
    Developer
    Redgate Software Ltd
  • 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.
  • 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
  • Beautiful, thanks Peter, the patched version is working just fine.
Sign In or Register to comment.