建立SQL链接服务器
时间:2021-07-01 10:21:17
帮助过:10人阅读
[master]
GO
/****** Object: LinkedServer [IPDYH] Script Date: 2018/2/9 9:11:53 ******/
EXEC master.dbo.sp_addlinkedserver
@server = N
‘IPDYH‘,
@srvproduct=N
‘ ‘,
@provider=N
‘SQLNCLI‘,
@datasrc=N
‘192.168.0.16\QYDYHMSSQL‘
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname=N
‘IPDYH‘,
@useself=N
‘False‘,
@locallogin=NULL,
@rmtuser=N
‘sa‘,
@rmtpassword=‘@KTYpms123‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘collation compatible‘,
@optvalue=N
‘false‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘data access‘,
@optvalue=N
‘true‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘dist‘,
@optvalue=N
‘false‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘pub‘,
@optvalue=N
‘false‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘rpc‘,
@optvalue=N
‘false‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘rpc out‘,
@optvalue=N
‘false‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘sub‘,
@optvalue=N
‘false‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘connect timeout‘,
@optvalue=N
‘0‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘collation name‘,
@optvalue=null
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘lazy schema validation‘,
@optvalue=N
‘false‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘query timeout‘,
@optvalue=N
‘0‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘use remote collation‘,
@optvalue=N
‘true‘
GO
EXEC master.dbo.sp_serveroption
@server=N
‘IPDYH‘,
@optname=N
‘remote proc transaction promotion‘,
@optvalue=N
‘true‘
GO
建立SQL链接服务器
标签:rem pre proc 简单的 链接服务器 reason false 有一个 name