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

  • From: Tim Gorman <tim@xxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 02 Apr 2004 05:38:25 -0700

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@xxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: