ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Performs health checks on the following data dictionary tables.
-- note that the directory {ORACLE_BASE}/diag/rdbms/<database_name>/<instance_name>/hm on a lab server
-- the directory created is /app/oracle/diag/rdbms/orabase/orabase/hm.
Runs the specified checker with the given arguments. The run's report will be maintained persistently in database.
And a big thank you to Earl Apex for a correction.
dbms_hm.run_check(
check_name IN VARCHAR2,
run_name IN VARCHAR2 := NULL,
timeout IN NUMBER := NULL,
input_params IN VARCHAR2 := NULL);
Checkers
ASM Allocation Check
CF Block Integrity Check
DB Structure Integrity Check
Data Block Integrity Check
Dictionary Integrity Check
Redo Integrity Check
Transaction Integrity Check
Undo Segment Integrity Check
Check names and their parameters can be accessed from the gv$hm_check and gv$hm_check_param.
Users can run all checks which are not internal in nature for example:
SELECT name
FROM gv$hm_check
WHERE internal_check = 'N';
which retrieves the list of checks that can be run manually by users.
SELECT name FROM gv$hm_check;
SELECT name FROM gv$hm_check
WHERE internal_check = 'N';
Runs a DDE (user) action for HM checks ... appears to be intended solely for internal use
dbms_hm.run_dde_action(
incident_id IN NUMBER,
directory_name IN VARCHAR2,
check_name IN VARCHAR2,
run_name IN VARCHAR2,
timeout IN NUMBER,
params IN VARCHAR2)
RETURN BOOLEAN;
col check_name format a35
SELECT run_id, num_incident, check_name, name, timeout
FROM gv$hm_run
WHERE start_time > SYSTIMESTAMP-95
ORDER BY 1;
SQL> DECLARE
2 retVal BOOLEAN;
3 BEGIN
4 IF dbms_hm.run_dde_action(1, 'CTEMP', 'DB Structure Integrity Check', 'UWRUN', 10, NULL) THEN
5 dbms_output.put_line('T');
6 ELSE
7 dbms_output.put_line('F');
8 END IF;
9 END;
10 / T
PL/SQL procedure successfully completed.
Related Queries
DBMS_HM Related Queries
set linesize 125
col check_name format a30
col parameter_name format a18
col type format a15
col default_value format a15
col description format a40
SELECT c.name check_name, p.name parameter_name, p.type,
p.default_value, p.description
FROM v$hm_check_param p, v$hm_check c
WHERE p.check_id = c.id and c.internal_check = 'N'
ORDER BY c.name;
CHECK_NAME PARAMETER_NAME TYPE DEFAULT_VALUE DESCRIPTION
------------------------ -------------- --------------- --------------- ------------------
ASM Allocation Check ASM_DISK_GRP_NAME DBKH_PARAM_TEXT ASM group name
CF Block Integrity Check CF_BL_NUM DBKH_PARAM_UB4 Control file block number
Data Block Integrity Check BLC_DF_NUM DBKH_PARAM_UB4 File number
Data Block Integrity Check BLC_BL_NUM DBKH_PARAM_UB4 Block number
Dictionary Integrity Check CHECK_MASK DBKH_PARAM_TEXT ALL Check mask
Dictionary Integrity Check TABLE_NAME DBKH_PARAM_TEXT ALL_CORE_TABLES Table name
Redo Integrity Check SCN_TEXT DBKH_PARAM_TEXT 0 SCN of the latest good redo (if known)
Transaction Integrity Check TXN_ID DBKH_PARAM_TEXT Transaction ID
Undo Segment Integrity Check USN_NUMBER DBKH_PARAM_TEXT Undo segment number