Detect and Report Corruptions【每日一译】--2012-10-26

The first task is the detection and reporting of corruptions. Reporting not only
indicates what is wrong with a block, but also identifies the associated repair directive.
There are several ways to detect corruptions. Table 21–1 describes the different

detection methodologies

第一步任务是检测和报告故障。报告不仅要确定块的问题而且要确认相关的修复指南。

这里有几个诊断故障的方法,以下有几种诊断的方法。

1.DBMS_REPAIR PL/SQL package

Performs block checking for a specified table, partition, or index. It
populates a repair table with results.

1.执行一个块的核对对于一个指定的表,分区或索引,它善长修复表为目的。

2.DB_VERIFY utility

Performs block checking on an offline database

对于离线的数据库执行块的核对

3.ANALYZE TABLE SQL statement

Used with the VALIDATE STRUCTURE option, the ANALYZE
TABLE statement verifies the integrity of the structure of an index,
table, or cluster; checks or verifies that tables and indexes are
synchronized.

使用VALIDATE STRUCTURE选项,ANALYZE表语句核对索引,表,聚簇表的结构

完整性或者同步核实表或索引。

4.DB_BLOCK_CHECKING initialization paramete

When DB_BLOCK_CHECKING=TRUE, corrupt blocks are identified
before they are marked corrupt. Checks are performed when
changes are made to a block.

当DB_BLOCK_CHECKING=TRUE,损坏的坏在它们被确认为损坏前被确认的。

当有改变在一个块的时候核对将被被执行。

DBMS_REPAIR: Using the CHECK_OBJECT and ADMIN_TABLES Procedures
The CHECK_OBJECT procedure checks and reports block corruptions for a specified
object. Similar to the ANALYZE...VALIDATE STRUCTURE statement for indexes
and tables, block checking is performed for index and data blocks.

DBMS_REPAIR:使用CHECK_OBJECT和ADMIN_TABLE过程,CHECK_OBJECT过程核对

和报告块的损坏对一个指定对象。等同于ANALYZE...VALIDATE STRUCTURE语句对于索引

和表,对于索引和数据块块核对是被执行的。

Not only does CHECK_OBJECT report corruptions, but it also identifies any fixes that
would occur if FIX_CORRUPT_BLOCKS is subsequently run on the object. This
information is made available by populating a repair table, which must first be created
by the ADMIN_TABLES procedure.

CHECK_OBJECT不公报告故障,而且它也确定任何故障那个如果FIX_CORRUPT_BLOCK

相继运行在对象上发生故障。通过迁移到一个修复表这些信息将变得可用,这些信息必须

首先被ADMIN_TABLES过程所创建。

After you run the CHECK_OBJECT procedure, a simple query on the repair table shows
the corruptions and repair directives for the object. With this information, you can
assess how best to address the reported problems.

在你运行CHECK_OBJECT进程后,一个简单查询在修复表表显示了故障和修复指南在这个

对象上。通过这些信息,你可以核对标注报告问题是多么的合适。

DB_VERIFY: Performing an Offline Database Check
Use DB_VERIFY as an offline diagnostic utility when you encounter data corruption

使用DB_VERIFY作为离线诊断工具当你遭遇到数据故障。

ANALYZE: Reporting Corruption
The ANALYZE TABLE...VALIDATE STRUCTURE statement validates the structure of
the analyzed object. If the database successfully validates the structure, then a message
confirming its validation is returned. If the database encounters corruption in the
structure of the object, then an error message is returned. In this case, drop and
re-create the object.

ANALYZE TABLE...VALIDATE STRUCTURE语句验证了分析对象的架构。如果数据成功

地验证了架构,那么一个确认的验证信息将返回。如果数据库在对象的结构时遇到了故障,

那么一个错误的信息将返回。在这种情况下删除和重建对象。

DB_BLOCK_CHECKING Initialization Parameter

You can enable database block checking by setting the DB_BLOCK_CHECKING
initialization parameter to TRUE. This checks data and index blocks for internal
consistency whenever they are modified. DB_BLOCK_CHECKING is a dynamic

parameter, modifiable by the ALTER SYSTEM SET statement. Block checking is
always enabled for the system tablespace

你可以启用数据块核对通过设置DB_BLOCK_CHECKING初始化参数为TRUE.这些

核对数据和索引块用于内部一致性当它们被修改时。DB_BLOCK_CHECKING是一个动态

的参数。通过ALTER SYSTEM SET语句修改。对于系统表空间块的核对通常是被启用的。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值