ITPub博客

首页 > 数据库 > Oracle > ADRCI命令

ADRCI命令

原创 Oracle 作者:renjixinchina 时间:2014-01-08 15:05:52 0 删除 编辑

ADRCI 作用

1 查看ADR中的诊断数据

2 查看Health Monitor报表

3打包事件和诊断信息上传给Oracle Support

诊断信息包含:

 incident , problem, trace files, dumps, health monitor reports等

帮助,展示adrci相关命令

adrci> help

 

 HELP [topic]

   Available Topics:

        CREATE REPORT

        ECHO

        EXIT

        HELP

        HOST

        IPS

        PURGE

        RUN

        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 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> HELP SHOW TRACEFILE

 

  Usage: SHOW TRACEFILE [file1 file2 ...] [-rt | -t]

                        [-i inc1 inc2 ...] [-path path1 path2 ...]

 

  Purpose: List the qualified trace filenames.

  Options:

    [file1 file2 ...]: The trace files users are interested in to search.

    If "-i" or/and "-path" is specified, the trace files are assumed

    to be under the specified incidents or paths. Otherwise, the files

    will be searched among the trace directory and all incident directories

    of the current ADR homes. Filenames allow SQL like condition syntax.

    I.e., allowing wildcard search on filenames by using "%". For example,

    "%mmon%" means all trace files with the "mmon" substring.

 

    [-rt | -t]: Order the trace filenames. "-t" means in the modified

    timestamps order; "-rt" means in the reversed modified timestamps

    order. Note that the ordering is only apply to a single directory.

    [-i inc1 inc2 ...]: The trace files produced for the listed incidents.

    If no files are listed, all trace files produced for the list

    incidents are considered.

 

    [-path path1 path2 ...]: The trace files under the given paths will be

    queried. If no files are listed, all trace files under these paths

    are considered.

 

  Examples: 

    1. Show all the trace files under the current home

       "show tracefile"

    2. Show all the mmon trace files in time reverse order

       "show tracefile %mmon% -rt"

    3. Show all trace files under incidents 123 456, and /home/someone/temp

       "show tracefile -i 123 456 -path  /home/someone/temp"

 

 

 

使用ADRCI命令先需要设置Homepath 

不然有些会报如下错误

adrci> SHOW CONTROL

DIA-48448: This command does not support multiple ADR homes

 

 

adrci> show HOMES

ADR Homes:

diag/asm/+asm/+ASM1

diag/tnslsnr/zzwsjdb3/listener

adrci> set HOMEPATH diag/asm/+asm/+ASM1

adrci> show HOMES

ADR Homes:

diag/asm/+asm/+ASM1

 

 

ADRCI 常用功能

1 查看警告日志

SHOW ALERT -TAIL

SHOW ALERT -TAIL 50

SHOW ALERT -TAIL -F

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

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

 

ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:

*************************************************************************

ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME                              

-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------

1335663986           24                   24                   2013-12-20 09:27:21.295138 +08:00        2013-12-14 05:48:36.092047 +08:00        2013-12-20 09:18:52.380654 +08:00        1                    2                    80                   1                    2013-08-27 07:08:28.517862 +08:00      

1 rows fetched

6 查看错误

SHOW PROBLEM

adrci> set home diag/rdbms/racdb/racdb1

adrci> SHOW PROBLEM

 

ADR Home = /u01/app/oracle/diag/rdbms/racdb/racdb1:

*************************************************************************

PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME                            

-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------

3                    ORA 445                                                     88339                2013-12-16 08:42:43.929000 +08:00      

6                    ORA 29770                                                   72139                2013-09-13 16:25:39.344000 +08:00      

5                    ORA 603                                                     72002                2013-08-07 08:14:35.111000 +08:00      

4                    ORA 600 [kgantc_1]                                          64385                2013-08-07 08:14:20.437000 +08:00      

2                    ORA 240                                                     64154                2013-06-27 10:37:36.264000 +08:00      

1                    ORA 600 [ksfdchkfob1]                                       64425                2013-05-23 13:10:42.927000 +08:00     

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15747463/viewspace-1068366/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Log Buffer Space
请登录后发表评论 登录
全部评论

注册时间:2011-01-30

  • 博文量
    373
  • 访问量
    2161076