LINKED SERVER

  • Hi Experts,

    I have created added a linked server(sql 2000) to my sql server 2005,both are local servers.How can i select a particular table from the linked server using query.I tried giving select * from servername.database.schema.object but i got the error no such object found.PLease help

    TIA

  • You can use a open query as follows -

    SELECT *

    FROM OPENQUERY(LINK_SERVER_NAME,'SELECT * FROM SCHEMA.TABLE_NAME')

    OR

    directly as follows -

    SELECT *

    FROM LINK_SERVER_NAME..SCHEMA_NAME.TABLE_NAME

    Chandrachurh Ghosh
    DBA – MS SQL Server
    Ericsson India Global Services Limited
    Quality is not an act, it is a habit.

  • Sorry, those are for non-sql linked servers.....

    Was your test connection successful?

    What do you see in the catalog?

    Are you trying to see any object other than tables or views?

    Chandrachurh Ghosh
    DBA – MS SQL Server
    Ericsson India Global Services Limited
    Quality is not an act, it is a habit.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply