Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find server 'dbo' in sys.servers

I have a lot of services which query the database. All of them work fine but one service calling a stored procedure gives me following error:

Could not find server 'dbo' 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.

I have not idea why all the other stored procedures work fine and this one not...

By the way, I use SubSonic as data access layer.

like image 974
Lieven Cardoen Avatar asked Mar 20 '09 10:03

Lieven Cardoen


People also ask

What is Sysservers?

Description. sysservers contains one row for each remote Adaptive Server, Backup Server™, or Open Server™ on which this Adaptive Server can execute remote procedure calls.

Is Openquery faster than linked server?

The OPENQUERY is faster than the linked server because when we use the linked server, the SQL Server breaks the query into local and remote queries. The local queries are executed on the local server, and remote queries will be sent to the remote server.

How do you delete a linked server in SQL Server?

To remove all remote and linked server logins for a server when you remove the server, use the droplogins argument. sp_dropserver cannot be executed inside a user-defined transaction.


1 Answers

Please run select name from sys.servers from the server which you mentioned as default server in configuration file.

Here in name column values should match with your server names used in the report query.

e.g serverXXX.databasename.schema.tablename

serverXXX should be there in the result of select name from sys.servers otherwise it gives error as got.

like image 195
prasad Avatar answered Sep 25 '22 19:09

prasad