SQL Server创建LinkServer
USE [master] GO /****** Object: LinkedServer [xxx_LNK] Script Date: 2014/7/7 17:04:13 ******/ EXEC master.dbo.sp_addlinkedserver @server = N‘xxx_LNK‘, @srvproduct=N‘xxx_LNK‘, @provider=N‘SQLNCLI‘, @datasrc=N‘xxx.xx.xxx.xx‘, @catalog=N‘CMD‘ /* For security reasons the linked server remote logins password is changed with ######## */ EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N‘xxx_LNK‘,@useself=N‘False‘,@locallogin=NULL,@rmtuser=N‘dev‘,@rmtpassword=‘########‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘collation compatible‘, @optvalue=N‘false‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘data access‘, @optvalue=N‘true‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘dist‘, @optvalue=N‘false‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘pub‘, @optvalue=N‘false‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘rpc‘, @optvalue=N‘true‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘rpc out‘, @optvalue=N‘true‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘sub‘, @optvalue=N‘false‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘connect timeout‘, @optvalue=N‘0‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘collation name‘, @optvalue=null GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘lazy schema validation‘, @optvalue=N‘false‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘query timeout‘, @optvalue=N‘0‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘use remote collation‘, @optvalue=N‘true‘ GO EXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘remote proc transaction promotion‘, @optvalue=N‘true‘ GO
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。