Oracle8i SQL Reference
Release 2 (8.1.6)

A76989-01

Library

Product

Contents

Index

Prev Up Next

SQL Statements (continued), 3 of 11


CREATE ROLLBACK SEGMENT

Syntax


storage_clause: See "storage_clause".

Purpose

To create a rollback segment. A rollback segment is an object that Oracle uses to store data necessary to reverse, or undo, changes made by transactions.

For information on altering a rollback segment, see "ALTER ROLLBACK SEGMENT". For information on removing a rollback segment, see "DROP ROLLBACK SEGMENT".

Prerequisites

You must have CREATE ROLLBACK SEGMENT system privilege.

Keyword and Parameters

PUBLIC 

specifies 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.  

rollback_segment 

is the name of the rollback segment to be created. 

TABLESPACE 

identifies the tablespace in which the rollback segment is created. If you omit this clause, Oracle creates the rollback segment in the SYSTEM tablespace.

Restriction: You cannot create a rollback segment in a tablespace that is system managed (that is, during creation you specified EXTENT MANAGEMENT LOCAL AUTOALLOCATE). See "CREATE TABLESPACE"

 

Notes:

  • A tablespace can have multiple rollback segments. Generally, multiple rollback segments improve performance.

  • The tablespace must be online for you to add a rollback segment to it.

  • When you create a rollback segment, it is initially offline. To make it available for transactions by your Oracle instance, bring it online using the ALTER ROLLBACK SEGMENT statement. To bring it online automatically whenever you start up the database, add the segment's name to the value of the ROLLBACK_SEGMENTS initialization parameter.

 

 

See also: Oracle8i Administrator's Guide for more information on creating rollback segments and making them available. 

storage_clause  

specifies the characteristics for the rollback segment. See the "storage_clause".  

 

Notes:

  • The OPTIMAL parameter of the storage_clause is of particular interest, because it applies only to rollback segments.

  • You cannot specify the PCTINCREASE parameter of the storage_clause with CREATE ROLLBACK SEGMENT.

 

Examples

The following statement creates a rollback segment with default storage values in the system tablespace:

CREATE ROLLBACK SEGMENT rbs_2

TABLESPACE system; 

The above statement is equivalent to the following:

CREATE ROLLBACK SEGMENT rbs_2
   TABLESPACE system
   STORAGE
   ( INITIAL 10K
     NEXT 10K
     MAXEXTENTS UNLMIITED); 

Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index