Oracle7 Server Administrator's Guide

Contents Index Home Previous Next

Specifying Storage Parameters for Rollback Segments

This section describes aspects of specifying rollback segment storage parameters, and includes the following topics:

Setting Storage Parameters When Creating a Rollback Segment

Suppose you wanted to create a public rollback segment DATA1_RS with storage parameters and optimal size set as follows:

The following statement creates a rollback segment with these characteristics:

CREATE PUBLIC ROLLBACK SEGMENT data1_rs
   TABLESPACE users
   STORAGE (
      INITIAL 50K
      NEXT 50K
      OPTIMAL 750K
      MINEXTENTS 15
      MAXEXTENTS 100);

You can also use the Create Rollback Segment property sheet of Server Manager to set the rollback segment's storage parameters.

Changing Rollback Segment Storage Parameters

You can change a rollback segment's storage parameters after creating it. However, you cannot alter the size of any extent currently allocated to a rollback segment. You can only affect future extents.

Alter a rollback segment's storage parameters using either the Alter Rollback Segment property sheet of Server Manager, or the SQL command ALTER ROLLBACK SEGMENT.

The following statement alters the maximum number of extents that the DATA1_RS rollback segment can allocate.

ALTER PUBLIC ROLLBACK SEGMENT data1_rs 
   STORAGE (MAXEXTENTS 120);

You can alter the settings for the SYSTEM rollback segment, including the OPTIMAL parameter, just as you can alter those of any rollback segment.

Note: If you are altering a public rollback segment, you must include the keyword PUBLIC in the ALTER ROLLBACK SEGMENT command.

See Also: For guidance on setting sizes and storage parameters (including OPTIMAL) for rollback segments, see "Guidelines for Managing Rollback segments" [*].

Altering Rollback Segment Format

To alter rollback segments, you must have the ALTER ROLLBACK SEGMENT system privilege.

You can define limited or unlimited format for rollback segments. When converting to limited or unlimited format, you must take the rollback segments offline. If you identify unlimited format for rollback segments, extents for that segment must have a minimum of 4 data blocks. Thus, a limited format rollback segment cannot be converted to unlimited format if it has less than 4 data blocks in any extent. If you want to convert from limited to unlimited format and have less than 4 data blocks in an extent, your only choice is to drop and re-create the rollback segment.

Shrinking a Rollback Segment Manually

To shrink a rollback segment using you must have the ALTER ROLLBACK SEGMENT system privilege.

You can manually decrease the size of a rollback segment using the SQL command ALTER ROLLBACK SEGMENT. The rollback segment you are trying shrink must be online.

The following statement shrinks rollback segment RBS1 to 100K:

ALTER ROLLBACK SEGMENT rbs1 SHRINK TO 100K;

See Also: For a complete description of the ALTER ROLLBACK SEGMENT command, see the Oracle7 Server SQL Reference.


Contents Index Home Previous Next