If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Declared Temporary Table question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-10, 07:40
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Declared Temporary Table question

Greetings,

So far as I have gone through the docs, DGTT has to be dropped explicitly for a remote thread re-use ( pooled).

We will be using few Stored Procedures for reporting ETL from production. Develpment team has asked me to study & test DGTT usage across pooled threads ( connections , agents ).

Can some one correct me if I am wrong. A refrence will be helpful.

Regards

DBFinder
DB2V9.5.5 on Win2003
Reply With Quote
  #2 (permalink)  
Old 07-14-10, 08:16
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Not sure what you mean, but a Declared GTT does not have to be dropped, since it is only for that one sesson. But not sure I know exactly what you mean by pooled threads.

In DB2 9.7 there are CGTT (Created) which are created outside of the SP and each session gets its own copy, but the definition stays around in the catalog.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 07-14-10, 08:36
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Oh,

Let me explain.

Quote:
So far as I have gone through the docs, DGTT has to be dropped explicitly for a remote thread re-use ( pooled).
I was refering to pooled connections, applications are remote, the threads go into the pool after it is done, so I used remote thread re-use.

When a DGTT is declared with on commit perserve rows the DGTT will not be dropped when a thread is returned to pool.

Am I right here ?

If so, then we need to drop the DGTT explicitly before a thread is returned to the pool. Is it ??

That's all I mean by above quote.


Regards
Reply With Quote
  #4 (permalink)  
Old 07-14-10, 08:54
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
You are correct. Otherwise it will stick around for the life of the thread.
Dave
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On