Re: When will global temp table not be dropped after connection is

Tech-Archive recommends: Speed Up your PC by fixing your registry



I don't know if there is a way to tell who is using the table or not and I do not believe connection pooling has any effect. Maybe if you just tell us what the issue is we can be of more help.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:D11629A9-3AF3-4E11-ABDD-76F2545C1C60@xxxxxxxxxxxxxxxx
Hi Andrew,

Thanks for the reply. The global temp table is used for some special
purpose. How can I find out whether anything is still accessing that global
temp table? Does connection pooling or related settings have any effect on
the duration of the global temp table?


"Andrew J. Kelly" wrote:

Global temp tables are destroyed after the last user or connection is
finished with them. So if that connection is the only one accessing the
table at the time the connection is lost it will be destroyed. But global
temp tables are almost always a bad idea anyway. If you need persistence use
a real table instead.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:690FD37C-2E80-4F14-A0EB-500A5498D96A@xxxxxxxxxxxxxxxx
> Is there any SQL Server 2005 Express setting or ODBC setting that will
> cause
> global temp table not be dropped after the connection created it is > lost?



.



Relevant Pages

  • Re: VB with SQL Server... Unable to create temp table using ADO connection object
    ... The trace shows that spid 59 disconnects immediately after the global temp ... connection assuming it is not actively being used on a different connection. ... "Peri" wrote in message ...
    (microsoft.public.sqlserver.programming)
  • Re: When will global temp table not be dropped after connection is
    ... The global temp table is used for some special ... Does connection pooling or related settings have any effect on ... Andrew J. Kelly SQL MVP ... Hitchhiker’s Guide to Visual Studio and SQL Server ...
    (microsoft.public.sqlserver.connect)
  • Re: When will global temp table not be dropped after connection is los
    ... Global temp tables are destroyed after the last user or connection is finished with them. ... So if that connection is the only one accessing the table at the time the connection is lost it will be destroyed. ... Solid Quality Mentors ...
    (microsoft.public.sqlserver.connect)
  • Re: ##temp table already exists problem
    ... Global temp tables are visible to all connections, ... multiple processes, then you can easily get errors like that. ... which was created by another connection. ... Prev by Date: ...
    (comp.databases.ms-sqlserver)
  • Re: Connection performance issue
    ... only open the connection once at the beginning and close it when completely ... efficient way is to use connection pooling and let that handle the actual ... it's hundreds or thousands of normal users it makes more sense to use ... Andrew J. Kelly SQL MVP "Mark Goldin" wrote in message ...
    (microsoft.public.sqlserver.programming)