Oracle Database Undo Space
Oracle Database Undo Space
TABLESPACE
MANAGEMENT.
Undo tablespace contains before-images of data written to
the database.
ORACLE UNDO TABLESPACE MANAGEMENT.
ROLLBACK.
READ CONSISTENCY.
FLASHBACK technology.
There are three states or types of extents in the Undo tablespace: ACTIVE, EXPIRED and UNEXPIRED.
1> ACTIVE
Active undo extents are used by transactions and will always be active, because they are needed for
Rollback. The UNDO_RETENTION setting is not used here, because one can not say something like: ‘after
900 seconds you are not allowed to rollback anymore…’
You will get ‘ORA-30036 unable to extend segment in Undo tablespace’errors when no more space is
left to store ACTIVE Undo. This will automatically rollback the transaction causing it.
The NOSPACEERRCNT column in V$UNDOSTAT is a good indication how many times this has occurred.
2> EXPIRED
Expired extents are not used by transactions, the data in these extends is committed and the
UNDO_RETENTION time has passed, so it is not needed for Read Consistency.
3> UNEXPIRED
Unexpired extents are non-active extents that still honour UNDO_RETENTION. The transactions belonging
to these undo extents are committed, but the retention time has not passed: You still want/need these
for Read Consistency!
ORACLE UNDO TABLESPACE MANAGEMENT.
RETENTION GUARANTEED
When you create the Undo tablespace with the RETENTION GUARANTEE option, UNEXPIRED Undo
information will never get stolen. Set this if you want to guarantee Read Consistency or when you want
to use Flashback with a guaranteed point-in-time!
Beware that when this is set, the chance of ORA-30036 errors increases. It’s your choice: ORA-30036 or
ORA-01555…
You can switch from using one undo tablespace to another. Because the UNDO_TABLESPACE
initialization parameter is a dynamic parameter, the ALTER SYSTEM SET statement can be used to
assign a new undo tablespace.
When your UNDO Tablespace has increased in size, you need to Create new Undo tablespace ,
make it as default and drop the old one. You can only drop Old undo tablespace when there are no
active extents in it.