11G执行oracle自带的检查 check

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.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/500314/viewspace-1066098/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/500314/viewspace-1066098/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值