SQL SERVER-LinkServer搬迁

Posted jinweichang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SQL SERVER-LinkServer搬迁相关的知识,希望对你有一定的参考价值。

 

 选中linkserver,按F7打开对象游览器,

技术图片

选中linkserver,生成脚本。

技术图片

 

 

把密码填入脚本运行即可

USE [master]
GO

/****** Object:  LinkedServer [SDSC2-1]    Script Date: 5/29/2019 2:45:57 PM ******/
EXEC master.dbo.sp_addlinkedserver @server = NSDSC2-1, @srvproduct=NSQL Server
 /* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=NSDSC2-1,@useself=NFalse,@locallogin=NULL,@rmtuser=Nsa,@rmtpassword=########
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Ncollation compatible, @optvalue=Nfalse
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Ndata access, @optvalue=Ntrue
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Ndist, @optvalue=Nfalse
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Npub, @optvalue=Nfalse
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nrpc, @optvalue=Ntrue
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nrpc out, @optvalue=Ntrue
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nsub, @optvalue=Nfalse
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nconnect timeout, @optvalue=N0
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Ncollation name, @optvalue=null
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nlazy schema validation, @optvalue=Nfalse
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nquery timeout, @optvalue=N0
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nuse remote collation, @optvalue=Ntrue
GO

EXEC master.dbo.sp_serveroption @server=NSDSC2-1, @optname=Nremote proc transaction promotion, @optvalue=Nfalse
GO

 

以上是关于SQL SERVER-LinkServer搬迁的主要内容,如果未能解决你的问题,请参考以下文章

SQL SERVER-Job中Operators搬迁脚本

搬迁MYSQL数据库的几种方法介绍

SQL Server数据库中还原孤立用户的方法集合

解决公司搬迁中的网络以及ip电话故障

博客搬迁

博客搬迁