Global temporary tables in SQL Server -
i have ##table can accessed across sessions getting error
there object named '##table' in database.
why , how resolve it.
found interesting reference here:
global temporary tables operate local temporary tables; created in tempdb , cause less locking , logging permanent tables. however, visible sessions, until creating session goes out of scope (and global ##temp table no longer being referenced other sessions). if 2 different sessions try above code, if first still active, second receive following:
server: msg 2714, level 16, state 6, line 1 there object named '##people' in database.
i have yet see valid justification use of global ##temp table. if data needs persist multiple users, makes more sense, @ least me, use permanent table. can make global ##temp table more permanent creating in autostart procedure, still fail see how advantageous on permanent table. permanent table, can deny permissions; cannot deny users global ##temp table.
Comments
Post a Comment