Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Table Synchronization Script

Author  Topic 

langdu
Starting Member

9 Posts

Posted - 2007-11-16 : 09:24:51
Hi All,
I would like to synchronize a table to another table on different server by script. For example, tableSource, databaseSource, serverSource to tableDestination, databaseDestination, serverDestination.
Thank you.

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-11-16 : 09:36:38
You should use replication for this, that's what it is designed to do.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-11-16 : 10:26:41
use tablediff.exe:
http://weblogs.sqlteam.com/mladenp/archive/2007/03/03/60125.aspx

and the gui for it:
http://weblogs.sqlteam.com/mladenp/archive/2007/08/10/60279.aspx


_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

langdu
Starting Member

9 Posts

Posted - 2007-11-16 : 12:48:09
Thank you,
That almost works for me.
I want a .bat file with all commands performing that job, so I can run the .bat file at a specific time.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-11-16 : 12:52:51
tablediff gives you a script.
you can put that into a bat file that uses sqlcmd to run the scripts

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -