使用Oracle 11g的adrci的ips打包一個incident

hd_system發表於2017-03-13
[oracle@rhel63single ~]$ which adrci
/u02/app/oracle/product/11.2.0.4/db_1/bin/adrci
[oracle@rhel63single ~]$ adrci

ADRCI: Release 11.2.0.4.0 - Production on Sat May 2 22:32:28 2015----->這是os時間

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/u01/app/oracle"
adrci> show problem

ADR Home = /u01/app/oracle/diag/tnslsnr/rhel63single/listener:
*************************************************************************
0 rows fetched

ADR Home = /u01/app/oracle/diag/rdbms/test/test:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY              LAST_INCIDENT        LASTINC_TIME                             
-------------------- ------------------------ ----------------     ----------------------- 
1                    ORA 1578                 16961                2014-06-07 20:35:35.310000 +08:00       
2                    ORA 4031                 32428                2014-09-25 01:00:37.647000 +08:00       
3                    ORA 600 [qmrcGetRepRC]   32441                2014-09-25 02:20:00.781000 +08:00       
4                    ORA 445                  45655                2015-01-09 01:51:31.549000 +08:00       
4 rows fetched

adrci> show incident

ADR Home = /u01/app/oracle/diag/tnslsnr/rhel63single/listener:
*************************************************************************
0 rows fetched

ADR Home = /u01/app/oracle/diag/rdbms/test/test:
*************************************************************************
INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME                              
-------------------- ----------------------------------------------------------- ---------------------------------------- 
16961                ORA 1578                                                    2014-06-07 20:35:35.310000 +08:00       
31354                ORA 4031                                                    2014-09-25 00:31:36.018000 +08:00       
31355                ORA 4031                                                    2014-09-25 00:33:17.268000 +08:00       
31356                ORA 4031                                                    2014-09-25 00:39:46.038000 +08:00       
31357                ORA 4031                                                    2014-09-25 00:39:58.767000 +08:00       
31358                ORA 4031                                                    2014-09-25 00:40:07.251000 +08:00       
32441                ORA 600 [qmrcGetRepRC]                                      2014-09-25 02:20:00.781000 +08:00       
44677                ORA 445                                                     2015-01-08 20:46:37.901000 +08:00       
44573                ORA 445                                                     2015-01-08 20:58:13.842000 +08:00       
44574                ORA 445                                                     2015-01-08 21:12:58.866000 +08:00       
44679                ORA 445                                                     2015-01-08 21:15:43.893000 +08:00       
44575                ORA 445                                                     2015-01-09 01:03:26.299000 +08:00       
44683                ORA 445                                                     2015-01-09 01:10:24.094000 +08:00       
13 rows fetched

adrci> ips create package incident 31358
DIA-48448: This command does not support multiple ADR homes

adrci> show homes
ADR Homes: 
diag/tnslsnr/rhel63single/listener
diag/rdbms/test/test
adrci> set homepath diag/rdbms/test/test
adrci> ips create package incident 31358

Created package 1 based on incident id 31358, correlation level typical
adrci> adrci> 
adrci> 
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> show report
DIA-48415: Syntax error found in string [show report
] at column [12]

adrci> ips help
DIA-48415: Syntax error found in string [ips help] at column [8]

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 
        SHOW PACKAGE 
        UNPACK FILE 
        UNPACK PACKAGE 
        USE REMOTE KEYS 
adrci> ips show package
   PACKAGE_ID             1
   PACKAGE_NAME           ORA4031_20150502223521----->這是os時間
   PACKAGE_DESCRIPTION    
   DRIVING_PROBLEM        2
   DRIVING_PROBLEM_KEY    ORA 4031
   DRIVING_INCIDENT       31358
   DRIVING_INCIDENT_TIME  2014-09-25 00:40:07.251000 +08:00
   STATUS                 New (0)
   CORRELATION_LEVEL      Typical (2)
   PROBLEMS               1 main problems, 2 correlated problems
   INCIDENTS              1 main incidents, 5 correlated incidents
   INCLUDED_FILES         14

adrci> 


 至此,只能算是打包了一個incident,該incident只是被打包,還沒有生成在檔案系統上,如下是生成到檔案系統上的步驟:

[oracle@rhel63single test]$ adrci

ADRCI: Release 11.2.0.4.0 - Production on Sat May 2 22:53:37 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/u01/app/oracle"
adrci> show homes
ADR Homes: 
diag/rdbms/test/test
adrci> ips show package
   PACKAGE_ID             1
   PACKAGE_NAME           ORA4031_20150502223521
   PACKAGE_DESCRIPTION    
   DRIVING_PROBLEM        2
   DRIVING_PROBLEM_KEY    ORA 4031
   DRIVING_INCIDENT       31358
   DRIVING_INCIDENT_TIME  2014-09-25 00:40:07.251000 +08:00
   STATUS                 New (0)
   CORRELATION_LEVEL      Typical (2)
   PROBLEMS               1 main problems, 2 correlated problems
   INCIDENTS              1 main incidents, 5 correlated incidents
   INCLUDED_FILES         14

adrci> ips create package incident 31358 correlate all
Created package 2 based on incident id 31358, correlation level all
adrci> 
adrci> ips show package
   PACKAGE_ID             1
   PACKAGE_NAME           ORA4031_20150502223521
   PACKAGE_DESCRIPTION    
   DRIVING_PROBLEM        2
   DRIVING_PROBLEM_KEY    ORA 4031
   DRIVING_INCIDENT       31358
   DRIVING_INCIDENT_TIME  2014-09-25 00:40:07.251000 +08:00
   STATUS                 New (0)
   CORRELATION_LEVEL      Typical (2)
   PROBLEMS               1 main problems, 2 correlated problems
   INCIDENTS              1 main incidents, 5 correlated incidents
   INCLUDED_FILES         14

   PACKAGE_ID             2
   PACKAGE_NAME           ORA4031_20150502225909
   PACKAGE_DESCRIPTION    
   DRIVING_PROBLEM        2
   DRIVING_PROBLEM_KEY    ORA 4031
   DRIVING_INCIDENT       31358
   DRIVING_INCIDENT_TIME  2014-09-25 00:40:07.251000 +08:00
   STATUS                 New (0)
   CORRELATION_LEVEL      All (4)
   PROBLEMS               1 main problems, 2 correlated problems
   INCIDENTS              1 main incidents, 5 correlated incidents
   INCLUDED_FILES         14

adrci> ips GENERATE PACKAGE 1 
Generated package 1 in file /u01/app/oracle/diag/rdbms/test/test/ORA4031_20150502223521_COM_1.zip, mode complete-->生成在預設的位置
adrci> ips GENERATE PACKAGE 2 in /home/oracle/
Generated package 2 in file /home/oracle/ORA4031_20150502225909_COM_1.zip, mode complete--->生成到指定的位置
adrci> 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29209863/viewspace-2135215/,如需轉載,請註明出處,否則將追究法律責任。

相關文章