概述
USE [master]
GO
/****** Object: LinkedServer [ERP] Script Date: 2020/9/24 14:15:07 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'ERP', @srvproduct=N'', @provider=N'SQLNCLI', @datasrc=N'192.168.1.23'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'ERP',@useself=N'False',@locallogin=NULL,@rmtuser=N'SRMLINK',@rmtpassword='########'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'use remote collation', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'ERP', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO
最后
以上就是淡淡时光为你收集整理的SQLSERVER创建链接服务器的全部内容,希望文章能够帮你解决SQLSERVER创建链接服务器所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复