General Information |
Note: Health checks operate on
the following catalog tables |
access$, bootstrap$, ccol$, cdef$, clu$,
col$, coltype$, con$, defrole$, dependency$, dual$, ecol$, fet$, file$,
icol$, icoldep$, ind$, lob$, ntab$, obj$, objauth$, objpriv$, opqtype$,
refcon$, seg$, seq$, subcoltype$, superobj$, syn$, sysauth$, tab$,
ts$, tsq$, typed_view$, uet$, ugroup$, undo$, user$, view$, viewcon$ |
Source |
{ORACLE_HOME}/rdbms/admin/dbmshm.sql |
First Available |
11.1 |
Dependent Objects |
gv$hm_check |
gv$hm_info |
gv$hm_check_param |
gv$hm_recommendation |
gv$hm_finding |
gv$hm_run |
|
Exceptions |
Number |
Name |
-111 |
internal_error |
|
Operating System Directory |
%ORACLE_BASE/diag/rdbms/orabase/orabase/hm |
Security Model |
Execute is granted to the DBA role |
|
CREATE_OFFLINE_DICTIONARY |
Creates LogMiner offline dictionary in ADR |
dbms_hm.create_offline_dictionary; |
exec dbms_hm.create_offline_dictionary; |
|
CREATE_SCHEMA |
Creates
HM Schema in ADR |
dbms_hm.create_schema; |
exec dbms_hm.create_schema; |
|
DROP_SCHEMA |
Drops
HM Schema in ADR |
dbms_hm.drop_schema(force IN BOOLEAN); |
exec dbms_hm.drop_schema(FALSE); |
|
GET_RUN_REPORT |
Returns the report
for the specified checker run |
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';
SELECT run_id
FROM gv$hm_run;
exec dbms_hm.run_check('Dictionary Integrity
Check', 'Run 2', 60);
SELECT run_id, name, check_name, run_mode,
status, src_incident, num_incident, error_number
FROM gv$hm_run;
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; |
|