question

Helen1999 avatar image
Helen1999 asked

Ways to compare and find differences for SQL Server tables and data

I have database uses a table to replicate data between the different servers. Once it replicates a service called the CMS Replication Service running on a web server adds it to SharePoint. When an artifact is uploaded at a servers it adds it to SharePoint and then it adds it to Journal (table). My lead believe we have some entries added to SharePoint that fail getting written to Journal. This there script I can use to check and then make sure everything that exists in Journal (table) exists in database (SharePoint database) which has and vise versa? Thank you so much!
replicationsql-server-serviceexisting-tableweb-service
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Do the two tables match in schema or is it different? Are checking just for the existence of the row in both tables or do you want to compare every single column as well?
0 Likes 0 ·

1 Answer

·
Cyborg avatar image
Cyborg answered
You can use [tablediff][1] utility, this is used to compare the data between tables especially in replication topology. [1]: https://msdn.microsoft.com/en-us/library/ms162843.aspx
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

+1- I always seem to forget about that tool.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.