ADRCI 常用功能
1 查看警告日志
SHOW ALERT -TAIL
SHOW ALERT -TAIL 50 显示最后50条
SHOW ALERT -TAIL -F 类似tail -f alertorcl.log
SHOW ALERT -P "MESSAGE_TEXT LIKE '%ORA-600%'"
2 查看trace file
SHOW TRACEFILE
SHOW TRACEFILE %mmon%
SHOW TRACEFILE %mmon% -PATH /home/steve/temp
SHOW TRACEFILE -RT
3 查看Incidents
SHOW INCIDENT
SHOW INCIDENT -MODE BRIEF
SHOW INCIDENT -MODE DETAIL
SHOW INCIDENT -MODE DETAIL -P "INCIDENT_ID=1681"
4 清除日志
purge
purge -age 2 清除一天前日志
purge -age 1 清除当天日志
5 设置日志保存时间
包含两个属性
SHORTP_POLICY
Trace files
Core dump files
Packaging information
LONGP_POLICY
Incident information
Incident dumps
Alert logs
adrci> set home diag/rdbms/orcl/orcl
adrci> SET CONTROL(SHORTP_POLICY=24)
adrci> SET CONTROL(LONGP_POLICY=24)
adrci> show CONTROL
6 查看错误
SHOW PROBLEM
adrci> set home diag/rdbms/racdb/racdb1
adrci> SHOW PROBLEM
发表评论