Search code examples
sql-serversql-server-2000linked-server

SQL Query Invalid Object name via linked server


When I try the following query from Server3

Select * 
from [server1].[database1].[dbo].[tableX]

I recieve an an error of

Invalid Object Name

But when I execute the same query from Server2 the query works. Both are MSSQL 2000

UPDATE: When i tried to query a different table on server1 from server3

Select * 
from [server1].[database1].[dbo].[tableY]

from Server3 it works. Its just tableX wont work


Solution

  • First check that tableX exists on the destination server then check that a linked server is present

    Run:

    SELECT *
    FROM sys.servers;
    

    On Server2 and Server3 and see if the results are the same. This will show name of the host server along with any other linked servers that may exist. The Microsoft Doc is HERE.

    If there isn't a linked server set up on Server3 then create one, The Microsoft docs are HERE, but if you Google how to then there are plenty of guides out there.

    And think about upgrading from SQL SERVER 2000 is was desupported April 2013