Arun Kumar
Arun Kumar

Reputation: 877

Could not execute server name along with query

When I try to execute the below query it shown an error

Select * from [Domain].[Database Name].dbo.tblUser

Error:

Could not find server 'Domain' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

Upvotes: 1

Views: 225

Answers (1)

user111013
user111013

Reputation:

Like the error says, if you wish to connect from one SQL Server to another, you need to add the other server as a linked server.

See the definition for sp_addlinkedserver for how to do this.

Upvotes: 1

Related Questions