dbms_hm.get_run_report(
run_name IN VARCHAR2,
type IN VARCHAR2 := 'TEXT', -- 'XML', 'TEXT',
'HTML'
level IN VARCHAR2 := 'BASIC') -- 'BASIC', 'DETAIL'
RETURN CLOB;
desc gv$hm_run
SELECT name
FROM gv$hm_run;
set long
1000000
spool c: emp\uwhm.xml
SELECT dbms_hm.get_run_report('HM_RUN_1', 'XML',
'DETAIL') FROM dual;
spool off
RUN_CHECK
Runs the specified checker with the given arguments. The run's report will be maintained persistently in
database.
dbms_hm.run_check(check_name IN VARCHAR2,
checkname IN VARCHAR2,
run_name IN VARCHAR2 := NULL,
timeout IN NUMBER := NULL,
input_params IN VARCHAR2 := NULL);
Checkers
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$gm_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';
set linesize 121
col description format a40
col damage_description format a40
SELECT finding_id, status, type, description, damage_description
FROM gv$hm_finding
WHERE run_id = 221;
col name format a10
col repair_script format a60
SELECT name, type, rank, status, repair_script
FROM gv_$hm_recommendation
WHERE run_id = 21
AND fdg_id = 22;
RUN_DDE_ACTION
Runs a DDE (user) action for HM checks ... Appears to be for internal
usage only
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;
SELECT num_incident,
check_name, name, timeout
FROM gv$hm_run;
Queries
DBMS_HM Related Queries
set linesize 131
col check_name format a30
col parameter_name format a15
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;