Search code examples
sql-server-2008stored-proceduressubsonic

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.


Solution

  • It sounds like there is an extra "." (or two) in the mapping - i.e. it is trying to find server.database.schema.object. Check your mapping for stray dots / dubious entries.