ORA-01599与max_rollback_segments案例
在Oracle9i之前,如果 max_rollback_segments 参数设置不当,可能会导致数据库启动时出现ORA-01559错误:
ORA-01599 failed to acquire rollback segment (string), cache space is full (currently has (string) entries)
Cause: The amount statically allocated is not enough based on the value of the MAX_ROLLBACK_SEGMENTS parameter"
这个错误是说 max_rollback_segments 参数设置过小,通过增大该参数可以解决该问题。
max_rollback_segments 参数的含义如下:
Specifies the maximum size of the rollback segment cache in the SGA.
The number specified signifies the maximum number of rollback segments
that can be kept online (that is, status of ONLINE) simultaneously by one instance.
其缺省值为:max(30, transactions/transactions_per_rollback_segment)
而从Oracle9i开始,Oracle使用AUM模式,UNDO的管理自动化,该参数的限制作用不再,以下是我的一个测试,即使设置更小的 max_rollback_segment 数据库仍然能够Online更多的回滚段:
SQL> select * from V$RESOURCE_LIMIT;
RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION LIMIT_VALUE
------------------------------ ------------------- --------------- -------------------- -----------
processes 11 13 150 150
sessions 14 18 170 170
enqueue_locks 9 13 2230 2230
enqueue_resources 9 9 968 UNLIMITED
ges_procs 0 0 0 0
ges_ress 0 0 0 UNLIMITED
ges_locks 0 0 0 UNLIMITED