①清理 /u01/app/oracle/diag/rdbms/orcl/orcl/incident
#su - oracle
$cd /u01/app/oracle/product/11.2.0/db_1/bin
$adrci

show home

  • 发现有多条记录*
    set homepath /diag/rdbms/orcl/orcl
  • 强制设定清理目录的homepath*
    show home
  • 确认home只有一条记录*
    show incident
  • 查看incident文件,发现超多*
    purge -age 1440 -type incident
  • 24h60m=1440min 以分钟算*
    exit

②清理adump目录

$sqlplus / as sysdba 
  • //以dba身份连接库*

    SQL>show parameter audit_file_dest

  • //查看aud文件存放路径*

    $find /u01/app/oracle/admin/orcl/adump -mtime +3 -name "*.aud" | xargs rm -f

③清理trace文件

$sqlplus / as sysdba 
SQL>show parameter background_dump_dest
$find /u01/app/oracle/diag/rdbms/orcl/orcl/trace -mtime +3 -name "*.trc" | xargs rm -f
$find /u01/app/oracle/diag/rdbms/orcl/orcl/trace -mtime +3 -name "*.trm" | xargs rm -f

④清理xml日志

$find /u01/app/oracle/diag/rdbms/orcl/orcl/alert -mtime +3 -name "log_*.xml" | xargs rm -f