参数:UNDO_MANAGEMENT
默认值是否正确需要在安装后验证.
You determine the mode at instance startup
using the UNDO_MANAGEMENT initialization parameter. The default value for this
parameter is MANUAL. You set it to AUTO to enable automatic undo management
查看:
show parameter UNDO_MANAGEMENT;
修改后必须重启:you must shut down and
restart your database in order to effect the switch to another
method of managing undo.
使用自动撤销方式后,手工维护将被忽略,并且没有错误提示。
When operating in automatic undo management mode, any
manual undo management SQL statements are ignored and no
error message is issued. For example, ALTER ROLLBACK
SEGMENT statements will be ignored
参数:UNDO_RETENTION
可以设置低阀值,系统会自动调整。
那试图覆盖回滚段的错误是如何发生地?
对于lob字段保留时间不会自动调整,使用设置的值。
Automatic tuning of undo retention is not supported for LOBs. The RETENTION
value for LOB columns is set to the value of the UNDO_RETENTION parameter.
该参数可以随时修改:ALTER SYSTEM SET UNDO_RETENTION = 2400
undo space不足时出现的错误或风险:
If an active transaction
requires undo space and the undo tablespace does not have available space, then
the system starts reusing unexpired undo space. This action can potentially cause
some queries to fail with the "snapshot too old" message.
查看保留时间:
The amount of time for which undo is retained for Oracle Database for the current
undo tablespace can be obtained by querying the TUNED_UNDORETENTIONcolumn
of the V$UNDOSTAT dynamic performance view.
确保保留
查看当前设置,默认是不使用
You can use the DBA_TABLESPACES view to determine the RETENTION setting for
the undo tablespace. A column named RETENTION will contain a value on
GUARANTEE, NOGUARANTEE, or NOT APPLY (used for tablespaces other than the
undo tablespace).
设置该属性
You enable the guarantee option by specifying the RETENTION GUARANTEE clause
for the undo tablespace when it is created by either the CREATE DATABASE or
CREATE UNDO TABLESPACE statement. Or, you can later specify this clause in an
ALTER TABLESPACE statement. You do not guarantee that unexpired undo is
preserved if you specify the RETENTION NOGUARANTEE clause.
使用该属性可能导致的风险
By enabling the guarantee option, you instruct the database not to overwrite
unexpired undo data even if it means risking failure of currently active DML
operations.
undo tablespace的大小
先使用自增长,等系统负载稳定后设置为手动,在观察值中增加10%的预留。
切换undo tablespace
在切换过程中可能产生的错误:
If the parameter value for UNDO TABLESPACE is set to '' (two single quotes), then
the current undo tablespace is switched out and the next available undo tablespace
is switched in. Use this statement with care, because if there is no undo tablespace
available, the SYSTEM rollback segment is used. This causes ORA-01552 errors to be
issued for any attempts to write non-SYSTEM related undo to the SYSTEM rollback
segment.
ALTER SYSTEM SET UNDO_TABLESPACE = '';
undo配额限制:
When no UNDO_POOL directive is explicitly defined, users are allowed unlimited
undo space.
You can specify an undo pool for each consumer group. An undo pool controls the
amount of total undo that can be generated by a consumer group. When the total
undo generated by a consumer group exceeds its undo limit, the current UPDATE
transaction generating the redo is terminated. No other members of the consumer
group can perform further updates until undo space is freed from the pool.
出现问题查看日志,查看状态
Set the warning and critical alert thresholds for the undo tablespace alert
properly. Please refer to "Managing Space in Tablespaces" on page 13-9
information on how to set alert thresholds for the undo tablespace.
View |
Description |
V$UNDOSTAT |
Contains statistics for monitoring and tuning undo space. Use this view to help estimate the amount of undo space required for the current workload. The database also uses this information to help tune undo usage in the system. This view is meaningful only in automatic undo management mode. |
V$ROLLSTAT |
For automatic undo management mode, information reflects behavior of the undo segments in the undo tablespace |
V$TRANSACTION | Contains undo segment information DBA_UNDO_EXTENTS Shows the status and size of each extent in the undo tablespace. |
WRH$_UNDOSTAT |
Contains statistical snapshots of V$UNDOSTAT information. Please refer to Oracle 2 Day DBA for more information. |
WRH$_ROLLSTAT |
Contains statistical snapshots of V$ROLLSTAT information. Please refer to Oracle 2 Day DBA for more information. View Description |
监控实例
1、在日志中没有发现错误日志。
2、使用toad的dba中的undo查看,参数、状态正常
3、查看相应表空间,使用了250M空间充足
4、查看V$UNDOSTAT,保留时间900,没有变化,并发事务最多400,有大量过期和少量未过期,状态正常。