Coskan’s Approach to Oracle

April 2, 2007

ORA-12838 after direct load

Filed under: Tips — coskan @ 3:02 pm

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” :)

About these ads

3 Comments »

  1. 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

  2. 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

  3. 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


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 203 other followers

%d bloggers like this: