Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: ORA-12838 please : Is possible to append two times to the same 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
-- 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 - 09:34:38 CST
![]() |
![]() |