Options

SQL Data Compare Command Line

pyeldi11pyeldi11 Posts: 3
edited December 8, 2016 11:39AM in SQL Data Compare
I would like to compare the two table data differences using the command line, I am new to redgate

I am using following command

SqlDataCompare /S1:MyServer/Db1:Source /S2:MyServer /Db2:Destination /Include:Table:test /Include:Identical /v /sync

In Source table there is only one column that is "Id" which contains 1,2,3,4,5 and destination table also contains same column and having 100,200,300 in it. When I run above command i don't see any changes in destination table.

Any suggestions..

Comments

  • Options
    Hey pyeldi11,

    Thanks for contacting us and sorry you are having this issue - below is just a copy paste from the email I sent.
    I would recommend you alter your ``/Include:`` syntax a bit eg
    ``SqlDataCompare /S1:MyServer/Db1:Source /S2:MyServer /Db2:Destination /Include:table:[test] /Include:Identical /v /sync``
    or
    ``SqlDataCompare /S1:MyServer/Db1:Source /S2:MyServer /Db2:Destination /Include:table:[dbo].[test] /Include:Identical /v /sync``

    Let me know if you continue to have issues after that!
    Andrew Pierce
    Technical Sales Engineer
    Redgate Software
  • Options
    Hi Andrew Pierce,

    I have tried your commands but didn't work for me. I have included comparison key, that worked for me. Here is the command that I have used.
    SqlDataCompare.exe /S1:MyServer/Db1:Source /S2:MyServer/Db2:Destination /Include:Table /Include:Identical /ComparisonKeys:id:pk_id /v /sync

    Thanks,
    Pavan
Sign In or Register to comment.