Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Oh,

    Let me explain.

    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

  4. #4
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    You are correct. Otherwise it will stick around for the life of the thread.
    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •