View Single Post

   
  #6 (permalink)  
Old 02-26-2008, 06:17 AM
Galen Boyer
 
Posts: n/a
Default Re: Drop a Global Temporary Table using Classic ASP

On Tue, 12 Jun 2007, juan.oceguera@nav-international.com wrote:

> We are running the sql via a web application and once the data has
> been rendered, we wanted to administer clean up.


This is a good thing.

> On the web it's common practice to discard our objects (recordsets,
> connections, etc).


Yes, the objects you mention are good to clean up.

> It's my understanding that the data in GTT's is deleted once the
> session is done, but the schema will persist. These schemas will
> persist in the temp space...Is that correct?


You are thinking of #tmps. In SQLServer or Sybase, you shouldn't clean
them out either. For these vendors, you should create them at the
beginning of the life of the connection in the pool. Your cleanup step
should delete the data out of them, but not drop them.

An Oracle GTT exists as a single table for all connections. Treat it
just like all other tables. Create it with the chunk of ddl scripts
that are used to create all the persistent tables. The data either goes
away on commit or stays around on commit based on your creation
statement. Your cleanup step for these should be an issuance of a
commit on the connection in the pool.

--
Galen Boyer
Reply With Quote