Wednesday, June 10, 2009

Find out Table Differences and generate Scripts...

We have a utility in SQL Server 2005 and later which is 'TableDiff.exe' is usually placed in (c:\program files\Microsoft SQL Server\90\COM\tablediff.exe) it has different parameters and one can consult BOL for further details.
but which i like is, it will generate a .sql file and we can simply run it and get our tables synchronized... Must Try It.

open your command prompt and type like that according to your requirements.. and get a script file ready.

---------------------*************************-------------------------------
C:\>Program Files\Microsoft SQL Server\90\COM\tablediff.exe -SourceServer gtisb-eovms-01 -SourceDatabase SystemDB -SourceTable StaticContent -DestinationServer gtisb-eovms-03 -DestinationDatabase SystemDB -DestinationTable StaticContent -f d:\table_differencces.sql
---------------------*************************-------------------------------

No comments:

Post a Comment