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

Home -> Community -> Usenet -> c.d.o.misc -> ORA-12838 error on a stored procedure

ORA-12838 error on a stored procedure

From: DVD <billi.david_at_gmail.com>
Date: 22 Mar 2007 03:23:54 -0700
Message-ID: <1174559034.662384.46740@n76g2000hsh.googlegroups.com>


Hi,
i'd like to ask you about an oracle error, to understand where my stored procedure fails:

ORA-12838: cannot read/modify an object after modifying it in parallel

My stored procedure works as follow:

  1. SELECT on a table called TEMP
  2. it creates a cursor for iteration:

   OPEN cursor

      FOR sqlstr

   FETCH cursor

      BULK COLLECT INTO row_id, nome_ind;

   CLOSE cur_val;

where row_id e name_ind type is column type (table TEMP), in particular row_id type is ROWID

3) it starts to loop, calling a pl/sql function:

   FOR i IN name_ind.FIRST .. name_ind.LAST    LOOP
   ...

      res := insert_delete(CHARTOROWID (row_id (i)), name_ind (i));

   END LOOP;
   COMMIT; Function insert_delete do two steps, without a COMMIT, the final commit is external:

  1. INSERT INTO NAMES ... WHERE ROWID = row_id (i)
  2. DELETE FROM TEMP WHERE ROWID = row_id (i)

The stored procedure works good called with TOAD, with few rows; but it fails if called in production environment with the oracle error.

Can you help me about this error?

Thanks. Received on Thu Mar 22 2007 - 05:23:54 CDT

Original text of this message

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