oracle monitor病毒,Oracle 健康监控器(Health Monitor)

健康监控器(Health Monitor)ORACLE 11G 中引入了免费的数据库健康监控器,通过DBMS_HM程序包来完成。检查项目:1.DB结构完整性检查2.数据块及完整性检查3.中做日志完整性检查4.Undo段完整性检查5.事物完整性检查6.数据字典完整性检查SQL> select name,description from v$hm_check;NAME                           DESCRIPTION------------------------------ -------------------------------------------------HM Test Check                  Check for HM FunctionalityDB Structure Integrity Check   Checks integrity of all database filesData Block Integrity Check     Checks integrity of a datafile blockRedo Integrity Check           Checks integrity of redo log contentLogical Block Check            Checks logical content of a blockTransaction Integrity Check    Checks a transaction for corruptionsUndo Segment Integrity Check   Checks integrity of an undo segmentAll Control Files Check        Checks all control files in the databaseCF Member Check                Checks a multiplexed copy of the control fileAll Datafiles Check            Check for all datafiles in the databaseNAME                           DESCRIPTION------------------------------ -------------------------------------------------Single Datafile Check          Checks a datafileLog Group Check                Checks all members of a log groupLog Group Member Check         Checks a particular member of a log groupArchived Log Check             Checks an archived logRedo Revalidation Check        Checks redo log contentIO Revalidation Check          Checks file accessabilityBlock IO Revalidation Check    Checks file accessabilityTxn Revalidation Check         Revalidate corrupted txnFailure Simulation Check       Creates dummy failuresDictionary Integrity Check     Checks dictionary integrity21 rows selected.PROCEDURE RUN_CHECK Argument Name                  Type                    In/Out Default? ------------------------------ ----------------------- ------ -------- CHECK_NAME                     VARCHAR2                IN RUN_NAME                       VARCHAR2                IN     DEFAULT TIMEOUT                        NUMBER                  IN     DEFAULT INPUT_PARAMS                   VARCHAR2                IN     DEFAULT   .check_name:数据库检查名,这是一个强制参数必须被指定。可以在视图v$hm_check中查询到该参数的值。共21个值。.run_name:可选参数,指定一个检查名。.timeout:可选参数,可以设置老化时间。.params:输入参数,用于控制检查的执行。可以在视图v$hm_check_param视图中查看。以下是一个检查的例子:SQL>exec dbms_hm.run_check('Dictionary Integrity Check','HM_TEST');这个健康检查会存储报告到ADR数据库实例的home目录中。通过adrci的show hm_run命令可以显示这些信息:adrci> show hm_run.......**********************************************************HM RUN RECORD 2766**********************************************************   RUN_ID                        55361   RUN_NAME                      HM_RUN_55361   CHECK_NAME                    DB Structure Integrity Check   NAME_ID                       2   MODE                          2   START_TIME                    2015-09-28 08:58:30.714167 +08:00   RESUME_TIME                      END_TIME                      2015-09-28 08:58:30.742168 +08:00   MODIFIED_TIME                 2015-09-28 08:58:30.742168 +08:00   TIMEOUT                       0   FLAGS                         0   STATUS                        5   SRC_INCIDENT_ID               0   NUM_INCIDENTS                 0   ERR_NUMBER                    0   REPORT_FILE                   **********************************************************HM RUN RECORD 2767**********************************************************   RUN_ID                        55381   RUN_NAME                      HM_RUN_55381   CHECK_NAME                    DB Structure Integrity Check   NAME_ID                       2   MODE                          2   START_TIME                    2015-09-28 08:59:30.209094 +08:00   RESUME_TIME                      END_TIME                      2015-09-28 08:59:30.241902 +08:00   MODIFIED_TIME                 2015-09-28 08:59:30.241902 +08:00   TIMEOUT                       0   FLAGS                         0   STATUS                        5   SRC_INCIDENT_ID               0   NUM_INCIDENTS                 0   ERR_NUMBER                    0   REPORT_FILE                   adrci> show report hm_run testrun1DIA-48614: HM run with name [testrun1] not found网上其他人的例子:adrci> show report hm_run testrun1 Data Block CheckMultiple corrupted blocksdatafile 2 contains corrupt blockstablespace SYSAUX is unavailableblock 66578 in datafile 2 is corruptadrci>上面的报告显示数据文件2上有坏块,该文件属于sysaux表空间。所有的健康检查报告存储在v$hm_run视图中,你也可以通过dbms_hm包来获取报告:SQL> /NAME                             CHECK_NAME                       RUN_MODE STATUS-------------------------------- -------------------------------- -------- -----------HM_RUN_21                        DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_41                        DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_61                        DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_81                        DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_101                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_121                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_141                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_161                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_181                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_201                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_221                       DB Structure Integrity Check     REACTIVE COMPLETEDNAME                             CHECK_NAME                       RUN_MODE STATUS-------------------------------- -------------------------------- -------- -----------HM_RUN_241                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_261                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_281                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_301                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_321                       DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_341                       DB Structure Integrity Check     REACTIVE COMPLETED.....HM_RUN_55701                     DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_55721                     DB Structure Integrity Check     REACTIVE COMPLETEDNAME                             CHECK_NAME                       RUN_MODE STATUS-------------------------------- -------------------------------- -------- -----------HM_RUN_55741                     DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_55761                     DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_55781                     DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_55801                     DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_55821                     DB Structure Integrity Check     REACTIVE COMPLETEDHM_RUN_55841                     DB Structure Integrity Check     REACTIVE COMPLETEDmy_run                           Dictionary Integrity Check       MANUAL   COMPLETEDHM_TEST                          Dictionary Integrity Check       MANUAL   COMPLETEDHM_RUN_1                         DB Structure Integrity Check     REACTIVE COMPLETEDmy_run和HM_TEST就是我自己手动调用的。可以查看刚刚检查的SQL> set long 100000SQL> set longchunksize 1000SQL> set pagesize 1000SQL> set linesize 512SQL> select DBMS_HM.GET_RUN_REPORT('HM_TEST') FROM DUAL;DBMS_HM.GET_RUN_REPORT('HM_TEST')--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Basic Run Information Run Name                     : HM_TEST Run Id                       : 55901 Check Name                   : Dictionary Integrity Check Mode                         : MANUAL Status                       : COMPLETED Start Time                   : 2015-10-15 18:17:00.890101 +08:00 End Time                     : 2015-10-15 18:17:01.349346 +08:00 Error Encountered            : 0 Source Incident Id           : 0 Number of Incidents Created  : 0Input Paramters for the Run TABLE_NAME=ALL_CORE_TABLES CHECK_MASK=ALLRun Findings And Recommendations

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值