首页 > 代码库 > SQL Server创建LinkServer
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=‘########‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘collation compatible‘, @optvalue=N‘false‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘data access‘, @optvalue=N‘true‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘dist‘, @optvalue=N‘false‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘pub‘, @optvalue=N‘false‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘rpc‘, @optvalue=N‘true‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘rpc out‘, @optvalue=N‘true‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘sub‘, @optvalue=N‘false‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘connect timeout‘, @optvalue=N‘0‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘collation name‘, @optvalue=nullGOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘lazy schema validation‘, @optvalue=N‘false‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘query timeout‘, @optvalue=N‘0‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘use remote collation‘, @optvalue=N‘true‘GOEXEC master.dbo.sp_serveroption @server=N‘xxx_LNK‘, @optname=N‘remote proc transaction promotion‘, @optvalue=N‘true‘GO
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。