11g adrci全称(full name)
一个很无聊的问题
adrci = Oracle Automatic Diagnostic Repository Command Interpreter
是一个对Oracle日志管理的命令行接口
查看ADR 目录
adrci> show home
adrci> set home xxxxx
查看alert日志
1.show alert
2.show alert -tail -f(类似tail -f alertlog一样)
3.show alert -tail (last 10 lines)
4.show alert -p “MESSAGE_TEXT like ‘%ORA-%'”
查看control
adrci> show control
adrci> set control (SHORTP_POLICY = 360)
adrci> set control (LONGP_POLICY = 2160)
快速定位tracefile
(1)列出所有跟踪文件:
adrci> show tracefile
(2)模糊查询跟踪文件,比如某个进程的,注意这里区分大小写
adrci> show tracefile %mmon%
(3)可以指定某个路径
adrci> show tracefile %mmon% -path /home/steve/temp
(4)按时间排序
adrci> show tracefile -rt
定位incident和problem
adrci> show incident
adrci> show incident -mode detail -p “incident_id=1”
adrci> show incident -mode detail -p “problem_id=1”
adrci> show problem
adrci> show problem -p “problem_id=2”
ips打包
adrci> ips create package
adrci> ips create package incident 1
adrci> ips create package incident 53354 correlate all 设置level为all默认level是typical
adrci> ips create package problem 2
adrci> ips create package time ‘2013-12-23 00:00:00’ to ‘2013-12-23 02:00:00’
adrci> ips add new incidents package 3
adrci> ips add problem 12 package 3 –append
— 生成zip, 调用perl
adrci> ips generate package 3
adrci> ips GENERATE PACKAGE 3 in /tmp
–解压 zip, 注意tfactl 在exadata环境会自动创建zip, 可以手动解压
adrci> ips get metadata from file xxxx.zip
adrci> ips unpack file /opensource/oracle/IPSPKG_20230214104357_COM_1.zip into /opensource/oracle/
Unpacking file /opensource/oracle/IPSPKG_20230214104357_COM_1.zip into target /opensource/oracle/
清除purge
adrci> purge -age N
adrci> delete from problem where problem_id=1
adrci> purge -age 1440 -type trace
对不起,这篇文章暂时关闭评论。