SQL Data Compare Command Line
pyeldi11
Posts: 3
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..
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
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!
Technical Sales Engineer
Redgate Software
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