Adding linked servers in SQL farm

Handy lines for adding linked servers in your SQL farm:

   exec sp_addlinkedserver @server = ‘SQLSERVERNAME’, @srvproduct = N”, @provider=N’SQLNCLI’, @datasrc = ‘SERVERNAME’

   exec sp_addlinkedsrvlogin @rmtsrvname = ‘SQLSERVERNAME’, @useself = ‘false’, @locallogin = ‘login_svc’, @rmtuser = ‘user_svc’, @rmtpassword = ‘********’

 

Categories: SQL
Tags: