How to run Health Checks Manually
========================
We can run Health Monitor manually in following 2 ways
# By using the DBMS_HM PL/SQL package
# By using the Enterprise Manager interface, found on the Checkers subpage of the Advisor
Central page
How to run Health Checks Using the DBMS_HM(DBMS_HM.RUN_CHECK) PL/SQL Package
----------------------------------------------------------------------------
The DBMS_HM has procedure called RUN_CHECK . To call RUN_CHECK,
We need to supply the name of the check and a name for the run, as follows:
BEGIN
DBMS_HM.RUN_CHECK('Dictionary Integrity Check', 'my_run');
END;
To obtain a list of health check names, run the following query:
SELECT name FROM v$hm_check WHERE internal_check='N';
NAME
----------------------------------------------------------------
DB Structure Integrity Check
Data Block Integrity Check
Redo Integrity Check
Transaction Integrity Check
Undo Segment Integrity Check
Dictionary Integrity Check
Most of health checks accept input parameters. You can view parameter names and
descriptions with the V$HM_CHECK_PARAM view. Some parameters are mandatory while
others are optional. If optional parameters are omitted, defaults are used. The following query displays parameter information for all health checks:
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;
The Input parameters are passed in the input_params argument as name/value pairs
separated by semicolons (;). The following example illustrates how to pass the transaction ID as a parameter to the Transaction Integrity Check:
BEGIN
DBMS_HM.RUN_CHECK (
check_name => 'Transaction Integrity Check',
run_name => 'my_run',
input_params => 'TXN_ID=7.33.2');
END;
How to Run Health Checks Using Enterprise Manager
------------------------------------------------
Enterprise Manager provides an interface for running Health Monitor checkers.
To run a Health Monitor Checker using Enterprise Manager:
1. On the Database Home page, in the Related Links section, click Advisor Central.
2. Click Checkers to view the Checkers subpage.
3. In the Checkers section, click the checker you want to run.
4. Enter values for input parameters or, for optional parameters, leave them blank to
accept the defaults.
5. Click Run, confirm your parameters, and click Run again.
========================
We can run Health Monitor manually in following 2 ways
# By using the DBMS_HM PL/SQL package
# By using the Enterprise Manager interface, found on the Checkers subpage of the Advisor
Central page
How to run Health Checks Using the DBMS_HM(DBMS_HM.RUN_CHECK) PL/SQL Package
----------------------------------------------------------------------------
The DBMS_HM has procedure called RUN_CHECK . To call RUN_CHECK,
We need to supply the name of the check and a name for the run, as follows:
BEGIN
DBMS_HM.RUN_CHECK('Dictionary Integrity Check', 'my_run');
END;
To obtain a list of health check names, run the following query:
SELECT name FROM v$hm_check WHERE internal_check='N';
NAME
----------------------------------------------------------------
DB Structure Integrity Check
Data Block Integrity Check
Redo Integrity Check
Transaction Integrity Check
Undo Segment Integrity Check
Dictionary Integrity Check
Most of health checks accept input parameters. You can view parameter names and
descriptions with the V$HM_CHECK_PARAM view. Some parameters are mandatory while
others are optional. If optional parameters are omitted, defaults are used. The following query displays parameter information for all health checks:
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;
The Input parameters are passed in the input_params argument as name/value pairs
separated by semicolons (;). The following example illustrates how to pass the transaction ID as a parameter to the Transaction Integrity Check:
BEGIN
DBMS_HM.RUN_CHECK (
check_name => 'Transaction Integrity Check',
run_name => 'my_run',
input_params => 'TXN_ID=7.33.2');
END;
How to Run Health Checks Using Enterprise Manager
------------------------------------------------
Enterprise Manager provides an interface for running Health Monitor checkers.
To run a Health Monitor Checker using Enterprise Manager:
1. On the Database Home page, in the Related Links section, click Advisor Central.
2. Click Checkers to view the Checkers subpage.
3. In the Checkers section, click the checker you want to run.
4. Enter values for input parameters or, for optional parameters, leave them blank to
accept the defaults.
5. Click Run, confirm your parameters, and click Run again.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/500314/viewspace-1066098/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/500314/viewspace-1066098/