Home > SQL > Execute sp_addlinkedserver to add the server to sysservers

Execute sp_addlinkedserver to add the server to sysservers

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
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: