Linked Server and Global Temp Table

  • Is it possible to query from a global temp table from another server via linked server?

    When I use

    SELECT * from linked_server.db.owner.##GlobalTemp

    I get a message:

    Invalid object name ##GlobalTemp

  • Is this the exact method you are using to try to query a global temp table?

    Have you verified that the global temp table exists?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • When connecting directly to the server where the global temp table was created, I can query it, but I cannot query over the linked server.

    Using the linked server, I can see the object in tempdb.dbo.sysobjects.

    I am not allowed to create regular table on production server.

  • Have you tried using openrowset or openquery?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Openquery returns the same error.

Viewing 5 posts - 1 through 4 (of 4 total)

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