|
11g中oracle提供了一个ADRCI的命令行工具来查看ADR中的alert日志和trace信息,可以批量删除对应的日志文件。
adrci的位置在$ORACLE_HOME/bin目录下。
环境:Oracle19c,centos7.6
首先设置ADR base,一般和oracle_base一样。使用help命令查看帮助信息
[oracle@orcl ~]$ adrci
ADRCI: Release 19.0.0.0.0 - Production on Thu Feb 1 08:41:29 2024
Copyright (c) 1982, 2021, Oracle and/or its affiliates. All rights reserved.
No ADR base is set
adrci> help
HELP [topic]
Available Topics:
CREATE REPORT
ECHO
ESTIMATE
EXIT
HELP
HOST
IPS
PURGE
RUN
SELECT
SET BASE
SET BROWSER
SET CONTROL
SET ECHO
SET EDITOR
SET HOMES | HOME | HOMEPATH
SET TERMOUT
SHOW ALERT
SHOW BASE
SHOW CONTROL
SHOW HM_RUN
SHOW HOMES | HOME | HOMEPATH
SHOW INCDIR
SHOW INCIDENT
SHOW LOG
SHOW PROBLEM
SHOW REPORT
SHOW TRACEFILE
SPOOL
There are other commands intended to be used directly by Oracle, type
"HELP EXTENDED" to see the list
adrci> set base /u01/app/oracle
adrci> show home
ADR Homes:
diag/rdbms/orcl/orcl
adrci> purge -age 14400 -type incident #--删除10天前的incident 14400=60min*24*10
adrci> exit
|
|