Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Global Temp Table (PRESERVE ROWS) truncating unexpectedly

Re: Global Temp Table (PRESERVE ROWS) truncating unexpectedly

From: Jan Krueger <jk_at_stud.uni-hannover.de>
Date: Sun, 23 Sep 2007 18:11:54 +0200
Message-ID: <46f68fb8$0$29373$4c56b896@news-read1.lambdanet.net>


pmmgpgp_at_gmail.com wrote:
> I love "GLOBAL TEMPORARY TABLEs" (GTT). I
> have been using them for awhile, and find
> them to be a great tool.
>
> We are rac'ed but I am logging into one specific
> instance.
>
> My IDE is pl/sql developer version 7.1.2 and is configured for
> "Dual Sessions".
>
> I am working on a new package that utilizes
> three GTTs and all are declared to "PRESERVE ROWS".
>
> CREATE GLOBAL TEMPORARY TABLE my_temp_table (
> column1 NUMBER,
> column2 NUMBER
> ) ON COMMIT PRESERVE ROWS
>
> 'A' gets loaded with data and 'B' utilizes 'A'.
> 'C' is not populated with data at the time the
> problem occurs.
>
> Before you make an assumptions please read at
> least the next 3 paragraphs.
>
> I can manually debug the proc that loads 'A' and 'A'
> stays rock solid as it should.
>
> When I subsiquently manually debug the proc that
> builds 'B' from 'A', it runs fine but 'B' is empty
> when it is done. If I look at 'A', it is empty now (been truncated?).
>
> I have created another proc that simply debugs
> the two procs mentioned above sequentially. After
> running it I still have my 'A' data and my 'B' has the
> data that it should (all is well).
>
> As a test I populated the third GTT 'C' with data. With
> 'A' and 'C' both populated and I run my debug to try to
> populate 'B', the data is lost from 'A' and 'C'.
>
> I have included the proc that causes the problem
>
> Any ideas on what might be happening ( and what
> to do to get around whatever it is ).
>
> Thanks
> Dave

Did you keep in mind, the content of temporary tables is only visible from within the same session? Maybe your second procedure is executed in a different one?

Jan Received on Sun Sep 23 2007 - 11:11:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US