Archive

Archive for October, 2012

Execute sp_addlinkedserver to add the server to sysservers

October 1, 2012 Leave a comment

First time while trying to access the database in different server it will give error. Before accessing it we have to link the database server with the current server, else it will throw exception as below

Could not find server ‘XXXXXXXX’ in sysservers. Execute sp_addlinkedserver to add the server to sysservers.

To Link with current server run the below query

EXEC sp_addlinkedserver @server=’ServerName’

(Or)

EXEC sp_addlinkedsrvlogin Server’, ‘false’, NULL, ‘UserName’, ‘Password’

See http://msdn.microsoft.com/en-us/library/ms190479.aspx

Advertisements
Categories: SQL
%d bloggers like this: