A rollback segment is either online and available to transactions, or offline and unavailable to transactions. Generally, rollback segments are online and available for use by transactions.
To take a rollback segment online or offline, you must have the ALTER ROLLBACK SEGMENT system privilege.
You may wish to take online rollback segments offline in the following situations:
You might later want to bring an offline rollback segment back online so that transactions can use it. When a rollback segment is created, it is initially offline, and you must explicitly bring a newly created rollback segment online before it can be used by an instance's transactions. You can bring an offline rollback segment online via any instance accessing the database that contains the rollback segment.
Some resources used by the rollback segment for the in-doubt transaction remain inaccessible until the transaction is resolved. As a result, the rollback segment may have to grow if other transactions assigned to it need additional space.
As an alternative to bringing a PARTLY AVAILABLE segment online, you might find it easier to create a new rollback segment temporarily, until the in-doubt transaction is resolved.
ALTER ROLLBACK SEGMENT user_rs_2 ONLINE;
After you bring a rollback segment online, its status in the data dictionary view DBA_ROLLBACK_SEGS is ONLINE.
See Also: For information about the ROLLBACK_SEGMENTS and DBA_ROLLBACK_SEGS parameters, see the Oracle7 Server Reference.
To see a query for checking rollback segment state, see "Displaying Rollback Segment Information" .
The following example takes the rollback segment USER_RS_2 offline:
ALTER ROLLBACK SEGMENT user_rs_2 OFFLINE;
In contrast, if you try to take a rollback segment that contains rollback data for active transactions (local, remote, or distributed) offline, Oracle makes the rollback segment unavailable to future transactions and takes it offline after all the active transactions using the rollback segment complete. Until the transactions complete, the rollback segment cannot be brought online by any instance other than the one that was trying to take it offline. During this period, the rollback segment's status in the view DBA_ROLLBACK_SEGS remains ONLINE; however, the rollback segment's status in the view V$ROLLSTAT is PENDING OFFLINE.
The instance that tried to take a rollback segment offline and caused it to change to PENDING OFFLINE can bring it back online at any time; if the rollback segment is brought back online, it will function normally.
See Also: For information on viewing rollback segment status, see "Displaying Rollback Segment Information" .
For information about the views DBA_ROLLBACK_SEGS and V$ROLLSTAT, see the Oracle7 Server Reference.