SQL Server 2005 Linked server not finding tables
I have a linked server where I can clearly see all the databas开发者_运维问答es and tables, so I know the server is properly linked. However, when I try to execute a query, it says invalid object name, at the linked server's table.
The linked server is aliased as TCS, therefore, my query takes that table as
FROM [TCS].dbo.table as b
I have also tried including the database name also as FROM [TCS\db1].dbo.table.
What am I missing here?
Try including the DB name like so:
FROM [TCS].db1.dbo.table as b
I don't think you can specify the DB using a slash.
I would also check to make sure your security settings for the linked server are allowing your account to connect. This article touches on how to do that.
either:
- the user (used for the link) doesn't have access to the table; Grant access;
- the default DB on the server doesn't have the table. You have to change it to the relevant one or included in the db in the name:
[TCS].
DATABASE.dbo.table as b
;
精彩评论