When I was testing the virtual indexes for the previous post, I got ORA-12838 from the subsequent select after inserting 4 million rows without commit (I mean I forgot committing). The error was
ORA-12838: cannot read/modify an object after modifying it in parallel
The error documentation says ;
Cause: Within the same transaction, an attempt was made to add read or modification statements on a table after it had been modified in parallel or with direct load. This is not permitted.
Action: Rewrite the transaction, or break it up into two transactions: one containing the initial modification and the second containing the parallel modification operation.
Action was not clear for me. When I look at the code I saw that there wasnt any commit when i committed the transaction the error solved.
As a main idea for the blog entry “look twice to your code before taking an action”

what if , if we use the gtt table in the insert.
the issuing of commit will cause the gtt to lose its data.
so how to over come this. thanks
Comment by sarokrishnan — July 29, 2009 @ 1:25 pm
I think on commit preserve rows might be used in this case but not I am not sure
Comment by coskan — July 29, 2009 @ 1:31 pm
If you use PARALLEL hint for DML, then within the same transaction without commiting, no operation allowed on that table.
Comment by Kart — December 16, 2009 @ 6:52 pm