oracle 10g undo表空间使用率居高不下bug
对于UNDO
表空间大小的定义需要考虑UNDO_RETNETION
参数、产生的UNDO BLOCKS/
秒、UNDO BLOCK
的大小。undo_retention
:对于UNDO
表空间的数据文件属性为autoextensible,
则undo_retenion
参数必须设置,UNDO
信息将至少保留至undo_retention
参数设定的值内,但UNDO
表空间将会自动扩展。对于固定UNDO
表空间,将会通过表空间的剩余空间来最大限度保留UNDO
信息。如果FIXED UNDO
表空间没有对保留时间作GUARANTEE
(alter tablespace xxx retention guarantee;
),则undo_retention
参数将不会起作用。(警告:如果设置UNDO
表空间为retention guarantee
,则未过期的数据不会被复写,如果表空间不够则会导致DML
操作失败或者transation
挂起)
Oracle
10g
有自动Automatic Undo Retention Tuning
这个特性。设置的undo_retention
参数只是一个指导值,
,Oracle
会自动调整Undo (
会跨过undo_retention
设定的时间)
来保证不会出现Ora-1555
错误.
。通过查询V$UNDOSTAT
(该视图记录4
天以内的UNDO
表空间使用情况,超过4
天可以查询DBA_HIST_UNDOSTAT
视图) 的tuned_undoretention
(该字段在10G
版本才有,9I
是没有的)字段可以得到Oracle
根据事务量(如果是文件不可扩展,则会考虑剩余空间)采样后的自动计算出最佳的retenton
时间.
。这样对于一个事务量分布不均匀的
数据库
来说,
,就会引发潜在的问题--
在批处理的时候可能Undo
会用光, 而且这个状态将一直持续, 不会释放。
如何取消
10g
的
auto UNDO Retention Tuning
,有如下三种方法:
from metalink 420525.1
:
Automatic Tuning of Undo_retention Causes Space Problems
1.)
Set the autoextend and maxsize attribute of each datafile in the undo
ts so it is autoextensible and its maxsize is equal to its current size
so the undo tablespace now has the autoextend attribute but does not
autoend:
SQL> alter database datafile '<datafile_flename>'
autoextend on maxsize <current_size>;
With
this setting, v$undostat.tuned_undoretention is not calculated based on
a percentage of the undo tablespace size, instead
v$undostat.tuned_undoretention is set to the maximum of (maxquerylen
secs + 300) undo_retention specified
相关文档:
官方文档:http://tahiti.oracle.com/
metalink:http://metalink.oracle.com
itpub:www.itpub.com
TOM:asktom.oracle.com
oracle forum:http://forums.oracle.com/forums/main.jspa?categoryID=84
OTN:http://www.oracle.com/technology/index.html
www.oracle.com.cn
www.eygle.com
Oracle ERP
www.erp10 ......
转载
DML statements on temporary tables do not generate redo logs for the data changes. However, undo logs for the data
and redo logs for the undo logs are generated. Data from the temporary table is automatically
dropped in the case of session termination, either when the user logs o ......
create or replace directory MY_DIR as '/usr/test/';
create or replace function f_exportTxt(
--传入参数
i_query in varchar2,
i_separator in varchar2,
i_dir in varchar2,
i_filename in varchar2
) return number
is
/**
** 函数名:f_exportTxt
&nbs ......
TO_DATE格式(以时间:2007-11-02 13:45:25为例)
Year:
yy two digits 两位年 &n ......