Oracle 参数 DB_BLOCK_CHECKING 官方解释,作用,如何配置最优化建议
本站中文解释
DB_BLOCK_CHECKING 参数用于控制块检查的类型,其取值有如下:
1、TYPICAL: 使用MD5校验和基于CRC的检查,但不涉及比较相同空间中的多个块。
2、FULL: 将比较和计算同时作用于数据库实例中的所有字节,但仅在数据库实例启动时执行一次。
3、NULL->不进行块检查,后续会影响性能。
正确设置:
建议设置为 TYPICAL。
官方英文解释
DB_BLOCK_CHECKING
specifies whether Oracle Database performs block checking for database blocks.
Property | Description |
---|---|
Parameter type |
String |
Syntax |
|
Default value |
|
Modifiable |
|
Modifiable in a PDB |
Yes, with the following restriction: If block checking is enabled for a CDB, then you cannot subsequently disable block checking in any of its PDBs. That is, if the value of |
Basic |
No |
Values
-
OFF
orFALSE
No block checking is performed for blocks in 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
,INSERT
orDELETE
statements, or after inter-instance block transfers in Oracle RAC). -
MEDIUM
All
LOW
checks and full semantic checks are performed for all objects except indexes (whose contents can be reconstructed by a drop+rebuild on encountering a corruption). -
FULL
orTRUE
All
LOW
andMEDIUM
checks and full semantic checks are performed for all objects.
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 in most applications, depending on workload and the parameter value. Specific DML overhead may be higher. 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.
Caution:
Before enabling block checking with this parameter, Oracle recommends that you detect and repair any logical corruptions in the database. Otherwise, a block that contains logical corruption will be marked as “soft corrupt” after block checking is enabled and the block is modified by a DML statement. This will result in ORA-1578
errors and the block will be unreadable. For more information about detecting and repairing logical corruptions, see Oracle Database Backup and
Recovery User’s Guide.
See Also:
Oracle Database
Administrator’s Guide for more information about this parameter