关于undo的问题
以下都查看下
undo保留时间:
show parameter undo;
查UNDO段状态及自动调整的保留时间命令:
select BEGIN_TIME,
END_TIME,
MAXQUERYLEN,
MAXQUERYSQLID,
TUNED_UNDORETENTION
from V$UNDOSTAT Order By begin_time Desc;
查UNDO段EXPIRED等使用情况:
col "Tablespace_Name" for a15
col "Status" for a10
col "Size(GB)" for 99999
col "SIZE(GB)" for 99999.99
SELECT seg.tablespace_name "Tablespace_Name",
round(ts.bytes/1024/1024/1024) "Size(GB)",
ue.status "Status", count(*) "Used Extents",
round(sum(ue.bytes)/1024/1024/1024, 2) "US_SIZE(GB)",
to_char(round(sum(ue.bytes)/ts.bytes*100, 2), 99.99) "Used Rate(%)"
FROM dba_segments seg, DBA_UNDO_EXTENTS ue,
(SELECT tablespace_name, sum(bytes) bytes
FROM dba_data_files GROUP BY tablespace_name) ts
WHERE ue.segment_NAME=seg.segment_NAME and seg.tablespace_name=ts.tablespace_name
GROUP BY seg.tablespace_name, ts.bytes, ue.status
ORDER BY seg.tablespace_name;
执行下alter system set "_undo_autotune"=false scope=both sid='*';
根据这个maxqueryid查看下是执行的什么sql,这个占用大量的undo
把这个调小观察1天看看,ALTER SYSTEM SET undo_retention=7200 SCOPE=BOTH sid='*';
再不行,就继续扩大undo
原文地址:https://blog.csdn.net/jycjyc/article/details/139864017
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!