Mani's Blog

September 30, 2011

Oracle: ORA-22924: snapshot too old on BLOB columns

Filed under: Oracle — mani @ 9:00 pm

Issue:

We have a tool that migrated data between databases.   It reads partition by partition and moves them.  Due to nature of the application only current month or recent data will be busy with DML.   Only allowed DMLs are Insert or Delete.  The table contains BLOB columns.  When it is reading migration current month partition, the application started throwing errors “: java.sql.SQLException: ORA-01555: snapshot too old: rollback segment number with name “” too small
ORA-22924: snapshot too old “

UNDO_RETENTION and UNDO space all looked good.

Reason and solution:

LOB segments don’t use ROLLBACK or UNDO tablespace (except that are stored inline).

If there are high number of concurrent updates as well as reads of LOB column then increase the value for PCTVERSION on LOB Column.

PCTVERSION is percentage of LOB storage space kept for old versions of LOB data to maintain the read consistency for reads started before an update.  The default value is 10 percent.

RETENTION also can be used alternatively, but I used PCTVERSION to fix the issue.

I have increased the value from 10 to 50.

ALTER TABLE INTERNAL_MSG_DATA MODIFY LOB (RECIPIENT_IDS) ( PCTVERSION 50 );

ALTER TABLE INTERNAL_MSG_DATA MODIFY LOB (BODY) ( PCTVERSION 50 );

Advertisements

Leave a Comment »

No comments yet.

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

Create a free website or blog at WordPress.com.

%d bloggers like this: