Add Linked Server SQL Server
Add Linked Server:
USE [master]
GO
EXEC master.dbo.sp_dropserver @server=N'000.00.1.93', @droplogins='droplogins'
GO
EXEC master.dbo.sp_addlinkedserver @server = N'000.00.1.93', @srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'000.00.1.93',@useself=N'False',@locallogin=NULL
,@rmtuser=N'CORP\User Here',@rmtpassword='Password Here'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'use remote collation', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO
USE [master]
GO
EXEC master.dbo.sp_dropserver @server=N'000.00.1.93', @droplogins='droplogins'
GO
EXEC master.dbo.sp_addlinkedserver @server = N'000.00.1.93', @srvproduct=N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'000.00.1.93',@useself=N'False',@locallogin=NULL
,@rmtuser=N'CORP\User Here',@rmtpassword='Password Here'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'use remote collation', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'000.00.1.93', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO
0 Comments:
Post a Comment
<< Home