CREATE [PUBLIC] ROLLBACK SEGMENT rollback_segment [TABLESPACE tablespace]
[STORAGE ([INITIAL integer[K|M]] [NEXT integer[K|M]] [MINEXTENTS integer]
[MAXEXTENTS {integer|UNLIMITED}] [OPTIMAL {integer[K|M]|NULL}])]Creating Rollback Segments
Restrictions
• A rollback segment can be specified as either PUBLIC or PRIVATE (the default)
at the time of creation and cannot be changed.
• For a rollback segment, MINEXENTS must be at least two.
• PCTINCREASE cannot be specified for a rollback segment and is always set to 0.
• OPTIMAL, if specified, must be at least equal to the initial size of the rollback
segment, which is the space used by the number of extents defined by
MINEXTENTS.
Guidelines
• Always use INITIAL = NEXT for rollback segments to ensure that all extents are
of the same size.
• Set the OPTIMAL value to minimize the allocation and deallocation of rollback
segment extents.
• Avoid setting MAXEXTENTS to UNLIMITED. This could cause unnecessary
extension of a rollback segment and possibly of data files due to a program error.
• Always place rollback segments in a separate, exclusive tablespace to minimize
contention and fragmentation.可以在init文件里面建
还可以在数据库启动后使用sqlplus建或者用图形界面建
2.create public rollback segment testrb tablespace testdb storage (initial 1024k next 1024k minextents 8 maxextents 121);
3.alter rollback segment testrb online;
SQL> create public rollback segment R01 tablespace RBS storage (initial 1024k next 1024k minextents
8 maxextents 121);
create public rollback segment R01 tablespace RBS storage (initial 1024k next 1024k minextents 8 max
*
ERROR 位于第1行:
ORA-30019: Illegal rollback Segment operation in Automatic Undo mode
Action: restart instance in Manual Undo_Management mode and retry operation.