temp table

  • what is the difference between local temp table and global temp table?

  • a local temp table is available only to the connection that creates it (that SPID).

    The global temp table is for all connections.

  • it means,

    i opend the sqlserver with windows authentication mode and sqlserver authentication mode.

    is global temp table is available in these two connections?

  • Authentication mode does not matter, the rules and availability are the same.

    CEWII

  • thanks Steve and Elloote

  • 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

  • dlink (5/17/2010)


    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

    You should start a new thread for this question.

    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

  • dlink (5/17/2010)


    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

    Since the ##GlobalTemp table exists in TempDB you could try using this for the db, but I doubt it will work, because the name isn't actually the same within TempDB.

    Why don't you use a created table within the original database?

    Leo

    Striving to provide a better service.

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

Viewing 8 posts - 1 through 7 (of 7 total)

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