ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle工具——ADRCI(三)

Oracle工具——ADRCI(三)

原创 Linux操作系统 作者:yangtingkun 时间:2009-04-01 23:35:05 0 删除 编辑

ADRCI工具是Oracle11g才推出的新工具,主要用来管理alert文件、trace文件、dump文件、健康监事报告等。

这一篇介绍ADRCI工具的打包命令。

Oracle工具——ADRCI(一):http://yangtingkun.itpub.net/post/468/481227

Oracle工具——ADRCI(二):http://yangtingkun.itpub.net/post/468/481381

 

 

利用ADRCIIPS命令,可以将问题相关的trace文件,打包为一个zip文件,以提供给Oracle的支持人员。

adrci> help ips

 HELP IPS [topic]
   Available Topics:
        ADD
        ADD FILE
        ADD NEW INCIDENTS
        CHECK REMOTE KEYS
        COPY IN FILE
        COPY OUT FILE
        CREATE PACKAGE
        DELETE PACKAGE
        FINALIZE PACKAGE
        GENERATE PACKAGE
        GET MANIFEST
        GET METADATA
        GET REMOTE KEYS
        PACK
        REMOVE
        REMOVE FILE
        SET CONFIGURATION
        SHOW CONFIGURATION
        SHOW FILES
        SHOW INCIDENTS
        UNPACK FILE
        USE REMOTE KEYS

IPS包括的命令很多,介绍两种常用的打包方法。

最简单的方法莫过于直接使用PACK命令:

adrci> set home diag/rdbms/ora11g_p/ora11g
adrci> show problem -p "problem_id = 1"

ADR Home = /data/oracle/diag/rdbms/ora11g_p/ora11g:
*************************************************************************
PROBLEM_ID PROBLEM_KEY                LAST_INCIDENT LASTINC_TIME                      
---------- -------------------------- ------------- ----------------------------------
1          ORA 7445 [koioapm()+254]   14503         2007-09-06 02:50:52.122404 +08:00 
1 rows fetched

adrci> ips pack problem 1
Generated package 1 in file /home/oracle/IPSPKG_20090215012523_COM_1.zip, mode complete

另一种方法是利用CREATE PACKAGE命令,然后添加相关的INCIDENT,最后通过GENERATE PACKAGE命令来生成PACKAGE

adrci> ips create package
Created package 2 without any contents, correlation level typical
adrci> ips create package problemkey "ORA 7445 [koioapm()+254]"
Created package 3 based on problem key ORA 7445 [koioapm()+254], correlation level typical
adrci> ips add incident 172231 package 3
Added incident 172231 to package 3
adrci> ips add file /trace/ora11g_ora_4582.trc package 3
Added file /trace/ora11g_ora_4582.trc to package 3
adrci> ips generate package 3
Generated package 3 in file /home/oracle/IPSPKG_20090215013006_COM_1.zip, mode complete

还可以追加文件到PACKAGE 3

adrci> ips add new incidents package 3
Added new incidents to package 3
adrci> ips add problem 12 package 3
Added problem 12 to package 3
adrci> ips generate package 3
Generated package 3 in file /home/oracle/IPSPKG_20090215013006_COM_2.zip, mode complete

最后简单介绍一下UNPACK命令,这个命令可以将得到的zip文件解压到指定目录:

adrci> ips get metadata from file /home/oracle/IPSPKG_20090215012523_COM_1.zip
IPS metadata from file /home/oracle/IPSPKG_20090215012523_COM_1.zip:
----------------------------------------------------------


    1
    IPSPKG_20090215012523
    Complete
    1
    1
    2009-02-15 01:25:27.179103 +08:00
    /data/oracle
    /data/oracle/diag/rdbms/ora11g_p/ora11g
    rdbms
    ora11g_p
    ora11g
   

----------------------------------------------------------
adrci> ips unpack file /home/oracle/IPSPKG_20090215012523_COM_1.zip into /home/oracle
Unpacking file /home/oracle/IPSPKG_20090215012523_COM_1.zip into target /home/oracle
adrci> host
[oracle@yangtk ~]$ cd /home/oracle/diag/rdbms/ora11g_p/ora11g/
[oracle@yangtk ora11g]$ ls -l
total 44
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 alert
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 cdump
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 hm
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 incident
drwxr-xr-x 3 oracle oinstall 4096 Feb 15 02:21 incpkg
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 ir
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 lck
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 metadata
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 stage
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 sweep
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 trace
[oracle@yangtk ora11g]$ ls trace/
alert_ora11g.log
[oracle@yangtk ora11g]$ ls alert
log.xml

 

 

 

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

下一篇: DIA-48216 错误
请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10542041