ITPub博客

首页 > Linux操作系统 > Linux操作系统 > db_block_checking & db_block_checksum参数

db_block_checking & db_block_checksum参数

原创 Linux操作系统 作者:keeptrying 时间:2012-05-07 22:00:49 0 删除 编辑
    

db_block_checkingdb_block_checksum两个参数都是对block进行检查,两个参数中,db_block_checking是对块做逻辑性检查db_block_checksum则是做物理性检查

 

1、db_block_checking

Oracle checks a block by going through the data in the block, making sure it is logically self-consistent. Block checking can often prevent memory and data corruption. Block checking typically causes 1% to 10% overhead, depending on workload and the parameter value. The more updates or inserts in a workload, the more expensive it is to turn on block checking. You should set DB_BLOCK_CHECKING to FULL if the performance overhead is acceptable. For backward compatibility the use of FALSE (implying OFF) and TRUE (implying FULL) is preserved.

Even if this is turned off, block checking for the SYSTEM tablespace is always turned on.

db_block_checking block发生任何变化的时候进行逻辑上的完整性和正确性检查。

该参数能够避免内存中数据块的损坏。

块的检查将对系统会有1%10%的性能影响。取决于对db_block_checking参数的设置。频繁的DML将使得块检查带来更多的开销。在系统负荷允许的情形下建议设置为full

该参数对SYSTEM表空间始终是处于打开状态,而不管该参数是否设置为OFF

 

可选的参数:

  • OFF - no block checking is performed for blocks in the user tablespaces. However, semantic block checking for SYSTEM tablespace blocks is always turned on.
  • LOW - basic block header checks are performed after block contents change in memory (for example, after UPDATE or INSERT statements, on-disk reads, or inter-instance block transfers in RAC)
  • MEDIUM - all LOW checks are performed, as well as semantic block checking for all non-index-organized table blocks
  • FULL - all LOW and MEDIUM checks are performed, as well as semantic checks for index blocks (that is, blocks of subordinate objects that can actually be dropped and reconstructed when faced with corruption)

2、db_block_checksum

DB_BLOCK_CHECKSUM determines whether DBWn and the direct loader will calculate a checksum (a number calculated from all the bytes stored in the block) and store it in the cache header of every data block when writing it to disk. Checksums are verified when a block is read- only if this parameter is TYPICAL or FULL and the last write of the block stored a checksum. In FULL mode, Oracle also verifies the checksum before a change application from update/delete statements and recomputes it after the change is applied. In addition, Oracle gives every log block a checksum before writing it to the current log.

db_block_checksum 用于DBWndirect loader数据块写入到磁盘时,基于块内的所有字节计算得出一个校验值并将其写入块头。在该参数设置为typicalfull时,当读入时候重新计算校验和,并与写出时候的校验对比,如果不同则认为是块损坏。如果设置为FULL模式,则基于update/delete应用程序语句级别的改变发生后,校验值会被重新计算并写入。同时对于日志块,在写入之前,同样会生产校验值并写入到块头。

 

If this parameter is set to OFF, DBWn calculates checksums only for the SYSTEM tablespace, but not for user tablespaces.

如果设置为OFF则只对系统表空间有效。

 

Checksums allow Oracle to detect corruption caused by underlying disks, storage systems, or I/O systems. If set to FULL, DB_BLOCK_CHECKSUM also catches in-memory corruptions and stops them from making it to the disk. Turning on this feature in TYPICAL mode causes only an additional 1% to 2% overhead. In the FULL mode it causes 4% to 5% overhead. Oracle recommends that you set DB_BLOCK_CHECKSUM to TYPICAL. For backward compatibility we preserve use of TRUE (implying TYPICAL) and FALSE (implying OFF) values.

该参数主要是防止IO硬件和IO子系统的错误

 

 

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

请登录后发表评论 登录
全部评论

注册时间:2011-04-25

  • 博文量
    130
  • 访问量
    916772