| Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-01 |
|
SQL Statements: CREATE LIBRARY to CREATE SPFILE, 13 of 16
Use the CREATE ROLLBACK SEGMENT statement to create a rollback segment, which is an object that Oracle uses to store data necessary to reverse, or undo, changes made by transactions.
The information in this section assumes that your database is running in rollback undo mode (the UNDO_MANAGEMENT initialization parameter is set to MANUAL or not set at all).
If your database is running in Automatic Undo Management mode (the UNDO_MANAGEMENT initialization parameter is set to AUTO), then user-created rollback segments are irrelevant. In this case, Oracle returns an error in response to any CREATE ROLLBACK SEGMENT or ALTER ROLLBACK SEGMENT statement. To suppress these errors, set the UNDO_SUPPRESS_ERRORS parameter to TRUE.
Further, if your database has a locally managed SYSTEM tablespace, then you cannot create rollback segments in any dictionary-managed tablespace. Instead, you must
Oracle Corporation recommends that you use Automatic Undo Management.
To use objects in a tablespace other than the SYSTEM tablespace:
SYSTEM rollback segment) must be online.UNDO tablespace must be online.
See Also:
|
To create a rollback segment, you must have CREATE ROLLBACK SEGMENT system privilege.
create_rollback_segment::=
Specify PUBLIC to indicate that the rollback segment is public and is available to any instance. If you omit this clause, the rollback segment is private and is available only to the instance naming it in its initialization parameter ROLLBACK_SEGMENTS.
Specify the name of the rollback segment to be created.
Use the TABLESPACE clause to identify the tablespace in which the rollback segment is created. If you omit this clause, Oracle creates the rollback segment in the SYSTEM tablespace.
See Also:
|
The storage_clause lets you specify storage characteristics for the rollback segment.
The following statement creates a rollback segment with default storage values in an appropriately configured tablespace:
CREATE TABLESPACE rbs_ts DATAFILE 'rbs01.dbf' SIZE 10M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 100K; /* This example and the next will fail if your database is in Automatic Undo Mode. */ CREATE ROLLBACK SEGMENT rbs_one TABLESPACE rbs_ts;
The preceding statement is equivalent to the following:
CREATE ROLLBACK SEGMENT rbs_one TABLESPACE rbs_ts STORAGE ( INITIAL 10K NEXT 10K MAXEXTENTS UNLIMITED);
|
![]() Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|