码迷,mamicode.com
首页 > 数据库 > 详细

ORACLE 11.2 性能调优之03 ( ADR使用 )

时间:2020-07-27 09:33:51      阅读:81      评论:0      收藏:0      [点我收藏+]

标签:pwd   def   ***   install   RoCE   ali   param   nan   sls   

1.开启 adrci

[oracle@xag112 ~]$ adrci

      ADR base = "/u01/app/oracle"

adrci> show home
ADR Homes: 
diag/rdbms/db112/DB112
diag/tnslsnr/xag112/listener

adrci> set home diag/rdbms/db112/DB112

adrci> show home
ADR Homes: 
diag/rdbms/db112/DB112

2.显示所有问题

adrci> show problem

ADR Home = /u01/app/oracle/diag/rdbms/db112/DB112:
*************************************************************************
0 rows fetched

3.显示所有事件

adrci> show incident

ADR Home = /u01/app/oracle/diag/rdbms/db112/DB112:
*************************************************************************
0 rows fetched

4.跟踪alter 日志

#滚动显示 (类似tail -f alertlog一样)
adrci> show alert -tail -f
2020-07-11 19:01:13.365000 +08:00
CJQ0 started with pid=21, OS id=6128 
2020-07-11 19:01:16.492000 +08:00
Setting Resource Manager plan SCHEDULER[0x32DE]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Starting background process VKRM
VKRM started with pid=22, OS id=6130 
2020-07-11 19:01:19.998000 +08:00
XDB installed.
XDB initialized.
2020-07-11 19:06:12.558000 +08:00
Starting background process SMCO
SMCO started with pid=25, OS id=6175

#显示当前最后10条数据
adrci> show alert -tail
2020-07-11 19:01:13.365000 +08:00
CJQ0 started with pid=21, OS id=6128 
2020-07-11 19:01:16.492000 +08:00
Setting Resource Manager plan SCHEDULER[0x32DE]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Starting background process VKRM
VKRM started with pid=22, OS id=6130 
2020-07-11 19:01:19.998000 +08:00
XDB installed.
XDB initialized.
2020-07-11 19:06:12.558000 +08:00
Starting background process SMCO
SMCO started with pid=25, OS id=6175 

#显示当前最后10条数据
adrci> show alert -TAIL 10
2020-07-11 19:01:13.365000 +08:00
CJQ0 started with pid=21, OS id=6128 
2020-07-11 19:01:16.492000 +08:00
Setting Resource Manager plan SCHEDULER[0x32DE]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Starting background process VKRM
VKRM started with pid=22, OS id=6130 
2020-07-11 19:01:19.998000 +08:00
XDB installed.
XDB initialized.
2020-07-11 19:06:12.558000 +08:00
Starting background process SMCO
SMCO started with pid=25, OS id=6175 

5.在control中设置的保留时间之后的日志

adrci> show control

ADR Home = /u01/app/oracle/diag/rdbms/db112/DB112:
*************************************************************************
ADRID         SHORTP_POLICY  LONGP_POLICY  LAST_MOD_TIME        LAST_AUTOPRG_TIME LAST_MANUPRG_TIME  ADRDIR_VERSION   ADRSCHM_VERSION   ADRSCHMV_SUMMARY   ADRALERT_VERSION     CREATE_TIME                              
------------- -------------- ------------- -------------------- ----------------- ------------------ ---------------  ----------------  ----------------   -----------------    ------------- 
2949729008    720            8760          2020-07-10 23:19:05                                       1                 2                   80              1                    2020-07-10 23:19:05       

#改trace files保留72小时
adrci>  set control (SHORTP_POLICY = 72)        


adrci> set control (LONGP_POLICY = 96)  

#改incident file保留96小时
adrci> show control

ADR Home = /u01/app/oracle/diag/rdbms/db112/DB112:
*************************************************************************
ADRID         SHORTP_POLICY  LONGP_POLICY  LAST_MOD_TIME        LAST_AUTOPRG_TIME LAST_MANUPRG_TIME  ADRDIR_VERSION   ADRSCHM_VERSION   ADRSCHMV_SUMMARY   ADRALERT_VERSION     CREATE_TIME                              
------------- -------------- ------------- -------------------- ----------------- ------------------ ---------------  ----------------  ----------------   -----------------    ------------- 
2949729008    72             96            2020-07-11 19:29:53                                       1                 2                 80                 1                   2020-07-10 23:19:05 

6.进入OS命令模式

adrci> host
[oracle@xag112 ~]$ 

[oracle@xag112 ~]$ pwd
/home/oracle
[oracle@xag112 ~]$ exit
exit
adrci>

ORACLE 11.2 性能调优之03 ( ADR使用 )

标签:pwd   def   ***   install   RoCE   ali   param   nan   sls   

原文地址:https://www.cnblogs.com/mydb/p/13285140.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!