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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: ORA-12838 please : Is possible to append two times to thesame table before doing a commit

Re: ORA-12838 please : Is possible to append two times to thesame table before doing a commit

From: Juan Cachito Reyes Pacheco <jreyes_at_dazasoftware.com>
Date: Fri, 2 Apr 2004 11:50:28 -0400
Message-ID: <028a01c418ca$3eba3e70$2501a8c0@dazasoftware.com>


Thanks Tim,
that was only one example, to show the problem. the insert is of thousands of records, not only 5. The problems is that I can't do a join, because some circumstances can cause another insert.
After the first insert data is changed and then is reinserted the second group. No way to use a join.

As this is a hisctoric kind table, temporary tables are useless, there is no join.

it seems this is a Oracle limitation, not other chance, when I asked I supposed there could be some workaround in Metalink or hidden hint not supported by oracle to allow it.

Juan Carlos Reyes Pacheco
OCP
Database 9.2 Standard Edition
----- Original Message -----
From: "Tim Gorman" <tim_at_sagelogix.com>
To: <oracle-l_at_freelists.org>
Sent: Friday, April 02, 2004 8:38 AM
Subject: Re: ORA-12838 please : Is possible to append two times to thesame table before doing a commit

Juan Carlos,
First, I have to ask why you are bothering with APPEND when you are only adding 5 rows at a time? The APPEND feature (a.k.a. direct-path) as well as parallel execution is intended for loading thousands or millions or billions of rows. I suggest that you simply remove the APPEND hint — a whole lot easier...

However, just in case the sample code you posted to the list isn't what is truly being used, and in fact the real code is inserting more than 5 rows, then how about combining the two select clauses with a UNION statement, so that the two statements become one statement?

The ROWNUM in the WHERE clauses presents a problem, but perhaps:

> insert /*+ APPEND */ into ctb.xxxdeftra
> <first-SELECT-statement>
> union
> <second-SELECT-statement>;
>
> commit;

...and so on, as needed. This way, you can append dozens of such SELECT statements together and still make them one transaction. But please make sure that you are using the APPEND feature correctly, to load lots and lots of data? Not just 10 rows...

Hope that one or the other of these suggestions help...

-Tim

on 4/1/04 2:16 PM, Juan Cachito Reyes Pacheco at jreyes_at_dazasoftware.com wrote:

> Hi I have a serious problem
> I can't do two append insret to a table in a same transaction, and I can
join
in only one.
> because some times the same process( a function) must be runs more than
once
> and can't be a commit between them, all is only one transaction.
>
> I ask you if you please know about a trick to bypass this.
>
> SQL> INSERT /*+ append */ into ctb.xxdeftra select * from
ctb.deftransace_me
> where rownum <5;
>
> 4 filas creadas.
>
> SQL> INSERT /*+ append */ into ctb.xxdeftra select * from
ctb.deftransace_me
> where rownum <5;
> INSERT /*+ append */ into ctb.xxdeftra select * from ctb.deftransace_me
> where rownum <5
> *
> ERROR en lÝnea 1:
> ORA-12838: no se puede leer/modificar un objeto despuÚs de modificarlo en
paralelo
>
> before doing a commit



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Apr 02 2004 - 10:16:34 CST

Original text of this message

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