Identify the Corruption Extension for Block Corruption, Table/Index Inconsistency, Data Dictionary and Lost Writes (Doc ID 836658.1)
- Get link
- X
- Other Apps
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.1 to 12.1.0.2 [Release 10.2 to 12.1]Oracle Database Cloud Schema Service - Version N/A and later Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later Oracle Cloud Infrastructure - Database Service - Version N/A and later Oracle Database Cloud Exadata Service - Version N/A and later Information in this document applies to any platform. PurposeThe purpose of this article is to describe in a single note how to identify the most common corruptions/inconsistencies in Oracle 10g or above. ScopeCorruption TypesThere are several types of corruptions like:
DetailsDatafile Block Corruption - Intra block corruptionIt refers to intra block corruptions that may cause different errors like ORA-1578, ORA-8103, ORA-1410, ORA-600 etc. Oracle classifies the corruptions as Physical and Logical. See Note 840978.1
Identify TABLE / INDEX MismatchTable / Index inconsistencies is when an entry in the Table does not exist in the Index or vice versa. The common errors are ORA-8102, ORA-600 [kdsgrp1], ORA-1499 by "analyze validate structure cascade".
When an inconsistency is identified, the above analyze command will produce error ORA-1499 and a trace file.
Identify Extents Inconsistency in Locally Managed TablespaceIt refers to inconsistencies in the section used by Locally Managed Tablespaces (LMT) to keep information about used and free extents.
If there are inconsistencies, dbms_space_admin generates a trace file. Note that the session running dbms_space_admin may not report in the screen if inconsistencies are detected.
Identify Extents Inconsistency in Dictionary Managed TablespacesIt refers to inconsistencies in data dictionary tables FET$/UET$ used by Dictionary Managed Tablespaces to keep information of free and used extents respectively.
Dictionary Managed Tablespace are identified by EXTENT_MANAGEMENT='DICTIONARY' in view dba_tablespaces.
Identify Data Dictionary InconsistencyIt refers to inconsistencies between Data Dictionary tables. These tables are owned by the user SYS and are stored in the SYSTEM tablespace to keep track of the users, tables, indexes, etc that are created in the database.
Doc ID 136697.1 "hcheck.sql" script to check for known problems in Oracle8i, Oracle9i, Oracle10g and Oracle 11g Identify corruption caused by LOST WRITESA data block lost write occurs when an I/O subsystem acknowledges the completion of the block write, while in fact the write did not occur in the persistent storage. The result is that the block in the database is a stale/old copy which is not logical or physical corrupt; block internal structures are correct. Reference Doc ID 840978.1 for more information about Physical and Logical block corruption.
Identifying the corruption extension by lost IO is not straight forward as dbverify/rman run intra-block checks (blocks are not compared with another context). The block itself is healthy as structures are valid (not garbage). However, in very rare cases a block can be indirectly exposed to logical corruption especially in the space management area if there is a lost write. Example is that the block was being marked as full in the metadata but that change was lost. Subsequent inserts may logically corrupt the block.
The best option is to have a media recovery in place like a standby database or restore/recover the database in another system. Media recovery performs checks to identify if the block content is the one expected as the redo structure keeps track of block previous version (expected scn) and compare it with the current block scn. If there is a mismatch then ORA-600 [3020] or ORA-752 are produced. If a physical standby database is configured, then set now DB_LOST_WRITE_PROTECT to TYPICAL on primary and standby databases. By doing so the primary database will create redo entries for Reads (select statements) which helps to detect faster a lost write in the standby.
Identify Extents Inconsistency in Locally Managed Tablespace Identify Data Dictionary Inconsistency
This procedure checks the metadata associated to space management for a specific segment. Example for an LOB segment stored in ASSM tablespace: alter session set tracefile_identifier='ASSM_SEGMENT_VERIFY'; exec DBMS_SPACE_ADMIN.ASSM_SEGMENT_VERIFY('&OWNER','&LOBSEGMENT','LOB',null,DBMS_SPACE_ADMIN.SEGMENT_VERIFY_SPECIFIC,DBMS_SPACE_ADMIN.BITMAPS_CHECK) oradebug setmypid oradebug tracefile_name For MSSM segment: alter session set tracefile_identifier='SEGMENT_VERIFY'; exec dbms_space_admin.segment_verify('&TABLESPACENAME',&header_file,&header_block) oradebug setmypid oradebug tracefile_name
Running export may help to identify if a chained row has an invalid pointer which may cause ORA-00600 [25027] or ORA-00600 [kdsgrp1] but export does not identify an old block version or if there is a table/index mismatch. In UNIX systems it can be done to /dev/null: exp <schema>/<schema_passwd> full=y log=exp_validation.log file=/dev/null volsize=0
If ASM is used run validations as described in Doc ID 1675152.1.
ReferencesNOTE:369076.1 - How To Run DBV In Parallel On A Single Data FileNOTE:136697.1 - hcheck.sql - Script to Check Data Dictionary for Known Problems NOTE:819533.1 - How to identify the corrupt Object reported by ORA-1578 / RMAN / DBVERIFY NOTE:472231.1 - How to identify all the Corrupted Objects in the Database with RMAN NOTE:840978.1 - Physical and Logical Block Corruptions. All you wanted to know about it. NOTE:887263.1 - How to identify the SEGMENT reported by dbms_space_admin.TABLESPACE_VERIFY NOTE:1554054.1 - Quick method to identify table/index mismatch when analyze validate structure cascade takes significant time NOTE:100419.1 - SCRIPT: VALIDATE.SQL to ANALYZE .. VALIDATE STRUCTURE objects in a Tablespace NOTE:563070.1 - ORA-1499. Table/Index row count mismatch NOTE:1675152.1 - Collecting The Required Information For Support To Validate & Troubleshooting ASM Diskgroup Corruptions. |
- Get link
- X
- Other Apps

Comments
Post a Comment