创建链接服务器

/****** 对象:  LinkedServer [DATACENTER_LNK]    脚本日期: 03/27/2014 17:02:57 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'DATACENTER_LNK', @srvproduct=N'SQL', @provider=N'SQLNCLI', @datasrc=N'127.0.0.1'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'DATACENTER_LNK', @optname=N'use remote collation', @optvalue=N'true'

 

上一篇:SqlServer分布式跨数据库查询Join


下一篇:vs2017下C项目出现LNK 2019错误