views:

2564

answers:

2

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.

thx, Lieven Cardoen

+2  A: 

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.

Marc Gravell
If you have table names that contain periods, you'll also want to check that the name is enclosed in brackets, e.g., dbo.[SubSchema.Table] instead of dbo.SubSchema.Table.
tvanfosson
Thx, apparently some underscores were replaced by dots... no clue as why this happened. Thx.
Lieven Cardoen
A: 

Thanks Marc! had the same issue, didn't had an extra .dbo in my query

HYO