sql server add linked server

Note to myself.... Sometimes for development and testing purposes there is a need to add linked server using SQL Server that will actually point to itself so queries work properly with linked server name.

Below is the quote that I always forget:

EXEC sp_addlinkedserver
@server=N'[LinkedServerName]',
@srvproduct=N'',
@provider=N'SQLNCLI',
@datasrc=N'.';

For move info visit Microsoft sp_addlinkedserver

SHARE:


No data was returned.


Disclaimer: While every caution has been taken to provide our readers with most accurate information and honest analysis, please use your discretion before taking any decisions based on the information in this blog. Author will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.