今早手机收到一个信息,某客户的19c环境sysaux使用率超过了80%告警了。既然有事了还是需要登录查看下的
SYS > SET LINES 120 pagesize 199;
SYS > COL OCCUPANT_NAME FORMAT A30;
SYS > SELECT * FROM (SELECT OCCUPANT_NAME,SPACE_USAGE_KBYTES FROM V$SYSAUX_OCCUPANTS ORDER BY SPACE_USAGE_KBYTES DESC) WHERE ROWNUM<=5;
OCCUPANT_NAME SPACE_USAGE_KBYTES
----------------------- ------------------
SM/ADVISOR 11132800
AUDSYS 10230208
JOB_SCHEDULER 2530944
SM/AWR 1403136
SM/OPTSTAT 775168
其实是2个问题
1、解决SM/ADVISOR使用率高问题
参考MOS文档
How To Disable Optimizer Statistics Advisor From 12.2 Onwards (Doc ID 2686022.1)、
How To Purge Optimizer Statistics Advisor Old Records From 12.2 Onwards (Doc ID 2660128.1),
SYS > DECLARE
v_tname VARCHAR2(32767);
BEGIN
v_tname := 'AUTO_STATS_ADVISOR_TASK';
DBMS_STATS.DROP_ADVISOR_TASK(v_tname);
END;
/
2、AUDSYS使用率高问题
SYS > select count(*) from unified_audit_trail;
SYS > exec dbms_audit_mgmt.clean_audit_trail(audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED,use_last_arch_timestamp => FALSE);