dbms_hm 运行一次数据库健康检查

来源:互联网 发布:域名如何转让? 编辑:程序博客网 时间:2024/05/01 11:37

获得所有健康检查的列表:

sys@ORCL> select name from v$hm_check c where c.INTERNAL_CHECK='N';NAME------------------------------DB Structure Integrity CheckCF Block Integrity CheckData Block Integrity CheckRedo Integrity CheckTransaction Integrity CheckUndo Segment Integrity CheckDictionary Integrity CheckASM Allocation Check已选择8行。

执行健康检查:

sys@ORCL> exec dbms_hm.run_check('Dictionary Integrity Check','testrun2');PL/SQL 过程已成功完成。

查看健康检查结果:

sys@ORCL> select dbms_hm.get_run_report('testrun2') from dual;DBMS_HM.GET_RUN_REPORT('TESTRUN2')--------------------------------------------------------------------------------Basic Run Information Run Name                     : testrun2 Run Id                       : 2441 Check Name                   : Dictionary Integrity Check Mode                         : MANUAL Status                       : COMPLETED Start Time                   : 2013-11-08 21:19:18.326787 +08:00 End Time                     : 2013-11-08 21:19:20.081483 +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 Finding Finding Name  : Dictionary Inconsistency Finding ID    : 2442 Type          : FAILURE Status        : OPEN Priority      : CRITICAL Message       : SQL dictionary health check: file$ pk 42 on object FILE$               failed Message       : Damaged rowid is AAAAARAABAAAADpAAI - description: No further               damage description available

可以使用v$hm_finding和v$hm_recommendation来分析健康检查的发现,以及根据健康检查给出建议。
select * from v$hm_finding;
select * from v$hm_recommendation;

原创粉丝点击