In development and enterprise applications, several versions of SQL Server are linked to each other. Distributed reading and storage, we need to implement sp_addlinkedserver. SQL Server, SQL Server 2008, SQL Server 2012 and SQL Server 2014:
But today in the native Ms SQL Server 2014, to add a link to SQL Server 2000, use the following method:
SQL Server create a linked server sample sharing of stored procedures http://www.jb51.net/article/52314.htm This method executes in SQL Server 2008 and is no problem, it can add SQL Server 2000 of the link, but in SQL Server 2008 version, such as 2012 or 2014 run, it can perform correctly, but when browsing the link Server, the following exception appears:
When the program runs, the exception appears as follows:
Try to see if there are any relevant solutions on the Internet. Results in an English site to see a netizen reply, said that you can specify the version, but he did not post any code examples. The following is insus.net according to
SQL Server creates a linked server's sample sharing of stored procedures http://www.jb51.net/article/52314.htm here for a little change:
EXECUTE sp_addlinkedserver
@server = ' DB1 ',
@srvproduct = ' SQL Server ',
@provider = ' msdasql ',
@ DATASRC = null,
@location = null,
@provstr = ' driver={sql Server Native Client 10.0}; Server=xxx.xxx.xxx.xxx ',
@catalog = NULL go
EXECUTE sp_addlinkedsrvlogin
@rmtsrvname = ' DB1 ',
@useself = ' false ',
@rmtuser = ' sa ',
@rmtpassword = ' password ';
Go
The above implementation is due to the fact that several versions of SQL Server are already installed on this computer. If your computer is only installed with SQL Server 2014, there is no other version. To add additional server SQL Server 2000, you need to download SQL Server Native Client 10:http://msdn.microsoft.com/zh-cn/library/ms131321.aspx After entering the link, you can select "Other versions":
Oh, and solve a seemingly unresolved problem.