Oracle 视图 V$DATABASE_BLOCK_CORRUPTION 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图 V$DATABASE_BLOCK_CORRUPTION 是用来查看数据库中任何已知完整性问题的一种特殊视图,它包括了每一次损坏发现时在块头中发现的可能的分辨和备份信息。

它接收四个列,分别是FILE#、BLOCK#、BLOCKS、CHECKSUM。 FILE# 包含视图识别被破损的文件,BLOCK# 为被破损的物理块号,BLOCKS为破损物理块的数量,CHECKSUM为损坏物理块的校验和。

使用方法:我们可以使用以下语句来按 FILE# 列显示 V$DATABASE_BLOCK_CORRUPTION 视图的内容:

SELECT * FROM V$DATABASE_BLOCK_CORRUPTION ORDER BY FILE#;

官方英文解释

V$DATABASE_BLOCK_CORRUPTION displays information about database blocks that were corrupted after the last backup.

Column Datatype Description

FILE#

NUMBER

Absolute file number of the data file that contains the corrupt blocks

BLOCK#

NUMBER

Block number of the first corrupt block in the range of corrupted blocks

BLOCKS

NUMBER

Number of corrupted blocks found starting with BLOCK#

CORRUPTION_CHANGE#

NUMBER

Change number at which the logical corruption was detected. Set to 0 to indicate media corruption.

CORRUPTION_TYPE

VARCHAR2(9)

Type of block corruption in the data file:

  • ALL ZERO – Block header on disk contained only zeros. The block may be valid if it was never filled and if it is in an Oracle7 file. The buffer will be reformatted to the Oracle8 standard for an empty block.

  • FRACTURED – Block header looks reasonable, but the front and back of the block are different versions.

  • CHECKSUM – optional check value shows that the block is not self-consistent. It is impossible to determine exactly why the check value fails, but it probably fails because sectors in the middle of the block are from different versions.

  • CORRUPT – Block is wrongly identified or is not a data block (for example, the data block address is missing)

  • LOGICAL – Block is logically corrupt

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data

See Also:

“V$NONLOGGED_BLOCK” for information about nonlogged blocks


数据运维技术 » Oracle 视图 V$DATABASE_BLOCK_CORRUPTION 官方解释,作用,如何使用详细说明