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

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

sys@ORCL> select name from v$hm_check c where c.INTERNAL_CHECK='N';

NAME
------------------------------
DB Structure Integrity Check
CF Block Integrity Check
Data Block Integrity Check
Redo Integrity Check
Transaction Integrity Check
Undo Segment Integrity Check
Dictionary Integrity Check
ASM 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  : 0

Input Paramters for the Run
 TABLE_NAME=ALL_CORE_TABLES
 CHECK_MASK=ALL

Run 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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值