Oracle 参数 DB_BLOCK_CHECKSUM 官方解释,作用,如何配置最优化建议

本站中文解释

:

DB_BLOCK_CHECKSUM是Oracle的一个参数,用于检查数据库块的CRC(循环冗余校验)值,以确保数据的完整性,提高了数据库块丢失和损坏的概率,避免了数据库的底层损坏。

在实践环境中,如果想要正确设置DB_BLOCK_CHECKSUM,应该:

1、使用ALTER SYSTEM SET db_block_checksum=FULL命令来设置该参数;

2、确保所有数据库服务器进程,特别是Oracle实例服务器进程,都重新启动;

3、确认服务运行状态,确保数据库正常运行;

4、使用DBA_REGISTRY_SQL_PLAN_BASELINES视图查询计划基线,并使用ALTER SYSTEM SET optimizer_use_sql_plan_baselines=ON命令打开计划基线;

5、确保所有应用程序能够正常工作;

6、注意Oracle的服务器性能,例如,如果有必要,可以设置更大的数据库缓存,以提高性能。

官方英文解释

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.

Property Description

Parameter type

String

Syntax

DB_BLOCK_CHECKSUM = { OFF | FALSE | TYPICAL | TRUE | FULL }

Default value

TYPICAL

Modifiable

ALTER SYSTEM

Modifiable in a PDB

No

Basic

No

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.

Most of the log block checksum is done by the generating foreground processes, while the LGWR or the LGWR slave processes (LGnn processes) perform the rest of the work, for better CPU and cache efficiency.

If this parameter is set to OFF, DBWn calculates checksums only for the SYSTEM tablespace, but not for user tablespaces. In addition, no log checksum is performed when this parameter is set to 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 the use of TRUE (implying TYPICAL) and FALSE (implying OFF) values is preserved.

See Also:

Oracle Database Backup and
Recovery Reference
for more information about this parameter


数据运维技术 » Oracle 参数 DB_BLOCK_CHECKSUM 官方解释,作用,如何配置最优化建议