【11g】ADRCI (ADR Command Interpreter) -- IPS事件打包服務

secooler發表於2009-12-18
如果系統出現了異常需要取得Oracle支援人員協助處理時,以往通常需要手工準備很多的報告檔案,然後手工打包後發給Oracle support。從11g開始這個過程將大大的簡化,可以使用ADRCI命令打包資料庫中出現的異常事件,然後將打包後的檔案傳送到Oracle Support,由Oracle的支援人員做進一步的分析和處理。

1.IPS名詞解釋
是Incident Packaging Service的縮寫,事件打包服務是FDI(Fault Diagnosability Infrastructure)故障診斷基礎架構中的一項技術。可以對同一次錯誤或故障相關的資料進行打包,如traces,dumps,health check reports等。


使用Oracle在11g版本中提供的ADRCI工具可以非常便利的提供IPS,在之前的版本中如果要完成這個工具基本上是透過手工的方式來完成的。

透過這個小文兒給大家展示一下ADRCI命令的IPS打包過程,供參考。

1.使用“ips create package”建立一個新的邏輯包
1)進入到adrci命令列介面
secooler@secDB /home/oracle$ adrci

ADRCI: Release 11.2.0.1.0 - Production on Sat Dec 18 22:57:31 2009

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

ADR base = "/oracle/ora11gR2"
adrci>

2)嘗試建立邏輯包
adrci> ips create package;
DIA-48448: This command does not support multiple ADR homes

3)處理報錯
錯誤提示建立邏輯包命令不支援多個ADR homes,修改之。
(1)檢視當前有的homes情況
adrci> show homes
ADR Homes:
diag/rdbms/secooler/secooler
diag/tnslsnr/secDB/listener

(2)這裡我們選擇第一個home
adrci> set homepath diag/rdbms/secooler/secooler

(3)確認只有一個home
adrci> show homes
ADR Homes:
diag/rdbms/secooler/secooler

4)再次嘗試建立邏輯包,成功。
adrci> ips create package;
Created package 1 without any contents, correlation level typical

2.將診斷資料新增到剛剛建立的邏輯包中
系統中出現的112321事件新增到邏輯包1中,在系統中可以使用show incident命令獲得incident號。
adrci> ips add incident 112321 package 1;

3.生成物理包
adrci> ips generate package 1 in /tmp
Generated package 1 in file /tmp/IPSPKG_20091218230524_COM_1.zip, mode complete

4.簡單檢視一下解壓後的檔案目錄。可見Oracle在壓縮包中自動採集了很多相關資訊。
secooler@secDB /tmp$ unzip IPSPKG_20091218230524_COM_1.zip
Archive:  IPSPKG_20091218230524_COM_1.zip
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/IPS_CONFIGURATION.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/IPS_PACKAGE.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_INCIDENT.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_FILE.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_HISTORY.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/IPS_FILE_METADATA.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/IPS_FILE_COPY_LOG.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION_DEF.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION_PARAMETER_DEF.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION_PARAMETER.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/DDE_USER_INCIDENT_TYPE.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/DDE_USER_INCIDENT_ACTION_MAP.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/INCIDENT.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/INCCKEY.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/INCIDENT_FILE.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/PROBLEM.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/HM_RUN.dmp
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/export/EM_USER_ACTIVITY.dmp
  inflating: diag/rdbms/secooler/secooler/alert/log.xml
  inflating: diag/rdbms/secooler/secooler/trace/alert_secooler.log
  inflating: diag/rdbms/secooler/secooler/hm/HMREPORT_HM_RUN_41.hm
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/crs/crsdiag.log
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/metadata.xml
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/manifest_1_1.xml
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/manifest_1_1.html
  inflating: diag/rdbms/secooler/secooler/incpkg/pkg_1/seq_1/manifest_1_1.txt
  inflating: metadata.xml

secooler@secDB /tmp$ tree diag
diag
`-- rdbms
    `-- secooler
        `-- secooler
            |-- alert
            |   `-- log.xml
            |-- hm
            |   `-- HMREPORT_HM_RUN_41.hm
            |-- incpkg
            |   `-- pkg_1
            |       `-- seq_1
            |           |-- crs
            |           |   `-- crsdiag.log
            |           |-- export
            |           |   |-- DDE_USER_ACTION.dmp
            |           |   |-- DDE_USER_ACTION_DEF.dmp
            |           |   |-- DDE_USER_ACTION_PARAMETER.dmp
            |           |   |-- DDE_USER_ACTION_PARAMETER_DEF.dmp
            |           |   |-- DDE_USER_INCIDENT_ACTION_MAP.dmp
            |           |   |-- DDE_USER_INCIDENT_TYPE.dmp
            |           |   |-- EM_USER_ACTIVITY.dmp
            |           |   |-- HM_RUN.dmp
            |           |   |-- INCCKEY.dmp
            |           |   |-- INCIDENT.dmp
            |           |   |-- INCIDENT_FILE.dmp
            |           |   |-- IPS_CONFIGURATION.dmp
            |           |   |-- IPS_FILE_COPY_LOG.dmp
            |           |   |-- IPS_FILE_METADATA.dmp
            |           |   |-- IPS_PACKAGE.dmp
            |           |   |-- IPS_PACKAGE_FILE.dmp
            |           |   |-- IPS_PACKAGE_HISTORY.dmp
            |           |   |-- IPS_PACKAGE_INCIDENT.dmp
            |           |   `-- PROBLEM.dmp
            |           |-- manifest_1_1.html
            |           |-- manifest_1_1.txt
            |           |-- manifest_1_1.xml
            |           `-- metadata.xml
            `-- trace
                `-- alert_secooler.log

11 directories, 27 files

5.小結
使用ADRCI (ADR Command Interface)完成整個故障打包的過程是很便利的。這既方便了自己也方便了Oracle的support人員,利己利人,好事兩樁。

Good luck.

secooler
09.12.18

-- The End --

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

相關文章