Jessica
Jessica

Reputation: 239

SQL Server 2005 Linked server not finding tables

I have a linked server where I can clearly see all the databases 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?

Upvotes: 2

Views: 2550

Answers (2)

nad2000
nad2000

Reputation: 4905

either:

  1. the user (used for the link) doesn't have access to the table; Grant access;
  2. 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;

Upvotes: 0

Abe Miessler
Abe Miessler

Reputation: 85056

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.

Upvotes: 2

Related Questions