摘要:
一.使用场景:1) 用Job定时同步两个数据库数据时,作为Job的执行脚本;2) 手工同步数据时的执行脚本。二.具体示例:USE LocalDatabaseName;GO--创建链接服务器IF NOT EXISTS (select * from sys.servers where name = 'RemoteServer')BEGIN EXEC sp_addlinkedserver 'RemoteServer', '','SQLNCLI', 'xx.xx.xx.xx'ENDgo--登录链接服务器EXEC sp_ad 阅读全文