Sunday, March 10, 2013

0 Oracle Database Fault Diagnosability Infrastructure/DBMS_HM

Oracle Fault Diagnosability Infrastructure consolidate all the error log and store the files in the ADR ( automatic diagnostic repository ) outside of Oracle database. Here are the error log tyeps

 

  • Alert: XML base alert log.
  • Cdump: Core dumps for the database.
  • Trace: Trace files, including the text format of alert logs
  • Incident: one for each incident.
  • Health Monitor log

Health monitor check can be manually invoke by DBMS_HM package. Here are the Health Monitor check related tables:

  • V$HM_RUN : List all the Health Check has been executed
  • V$HM_FINDING : List the finding
  • V$HM_RECOMMENDATION : List the recommendation.
  • V$HM_CHEK: List all the check can be run by DBMS_HM

List all the diagnostic log file location

 show parameter diagnostic_dest
 col Name format A22
 col value format A50
 select Name,Value from v$diag_info;

image

List the check can be perform by DBMS_HM

 SELECT name FROM V$HM_CHECK WHERE INTERNAL_CHECK = 'N'

image

Invoke DBMS_HM check

exec dbms_hm.run_check('Dictionary Integrity Check', 'MY_HM1');

image

 

List the check has been run

select run_id, name from v$hm_run;

image

 

Retrieve the report

SET LONG 100000
SET LONGCHUNKSIZE 1000
SET PAGESIZE 1000
SET LINESIZE 512
SELECT DBMS_HM.GET_RUN_REPORT('MY_HM1') FROM DUAL;

image

adrci:

adrci – Automatic diagnostic repository command line interface is the command line which we can use to retrieve the alert log , HM report.   $ORACLE_HOME/bin/adrci

 

 

Use adrci to retrieve the alert log

show alert -tail
show homes
set homepath diag/rdbms/oradb0/oradb0
show alert -tail

image

The tail is the same result if we use linux tail command to tail the alert log

image

Use adrci to retrieve the health monitor report

show report hm_run HM_RUN_1

The output is going to be the same if we view the file under HM directory .

image

 

Reference

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates