Table of Contents
- 1. Executive Summary and Architectural Context
- 2. The Epistemology of Oracle Database Consistency
- 3. Scenario I: Temporal Divergence (ORA-01207)
- 4. Scenario II: Storage Subsystem Failures (ORA-01208)
- 5. Scenario III: Physical Corruption (ORA-01200)
- 6. Scenario IV: Identity Mismatches (ORA-01206 & ORA-01251)
- 7. Cloud and Modern Infrastructure Considerations
- 8. Deep Dive Case Study: The Dongfeng Motor Incident
- 9. Advanced Tools and Methodologies
- 10. Diagnostic Checklist and SQL Reference
- 11. Prevention and Architectural Best Practices
1. Executive Summary and Architectural Context
The reliability of an enterprise Relational Database Management System (RDBMS) is predicated on its ability to maintain the ACID properties—Atomicity, Consistency, Isolation, and Durability. Within the Oracle Database architecture, Consistency is not merely a logical concept but a strictly enforced physical relationship between the database's control structures (metadata) and its storage layers (datafiles and redo logs).
This error represents a critical breach of physical consistency. It indicates that the Oracle kernel, during its startup verification phase, has detected a fundamental discrepancy between the expected state of a datafile (as recorded in the Control File) and the actual physical state of that file on disk.
Unlike transient network failures or resource contention issues, ORA-01122 signals a corruption of the database "timeline." The kernel is asserting that the datafile in question does not belong to the same version of history as the rest of the database. This divergence can stem from:
- Improper backup restoration
- Storage subsystem failures (such as split-brain mirror states)
- Operating system configuration errors
- Physical file truncation
The ORA-01122 Error Taxonomy
| Primary Error | Secondary Error | Interpretation | Root Cause Category |
|---|---|---|---|
| ORA-01122 | ORA-01207 | File is more recent than control file | Temporal Divergence (Old Control File) |
| ORA-01122 | ORA-01208 | Data file is an old version | Storage Failure / Stale Mirror |
| ORA-01122 | ORA-01200 | Actual file size is smaller than correct size | Physical Corruption / Truncation |
| ORA-01122 | ORA-01206 | File is not part of this database (Wrong DBID) | Identity Mismatch / Cloning Error |
| ORA-01122 | ORA-01251 | Unknown File Header Version | Header Corruption / Partial Write |
2. The Epistemology of Oracle Database Consistency
To understand the severity of ORA-01122, one must first master the mechanisms Oracle uses to track time and state. The database does not rely on wall-clock time, which is prone to drift and adjustment. Instead, it relies on the System Change Number (SCN), a logical timestamp that monotonically increases with every committed transaction and structural change.
2.1 The Control File: The Repository of Truth
The Control File acts as the database's "brain." It contains a registry of every datafile that comprises the database, along with critical synchronization metadata for each file:
- Checkpoint SCN: The SCN at which the last checkpoint operation wrote dirty buffers to this specific datafile.
- Stop SCN: A flag indicating if the file was closed cleanly (e.g., during a SHUTDOWN IMMEDIATE). If the database is open or crashed, this value is set to infinity or NULL.
- Database Identifier (DBID): A unique 32-bit integer distinguishing this database from all others.
- File Size: The precise number of data blocks the file should contain.
2.2 The Datafile Header: The Physical Record
The first block of every Oracle datafile (Block 1) is the File Header. It contains the file's own perspective of its state:
- Checkpoint SCN: The SCN of the last write applied to this file.
- Creation SCN: The SCN at which the file was created.
- Resetlogs SCN: The SCN of the last OPEN RESETLOGS operation, defining the database "incarnation."
- Physical Characteristics: Block size and total block count.
2.3 The Verification Check Mechanism
When an instance attempts to transition from the MOUNT state (where the Control File is read)
to the OPEN state (where datafiles are accessed), the System Monitor (SMON)
process and foreground processes perform a mandatory verification check. They compare the metadata in
the Control File against the headers of every online datafile.
The error ORA-01122 is a generic wrapper. It serves as a high-level declaration that this comparison failed. It is almost never thrown in isolation. The specific nature of the failure—whether the file is too old, too new, too small, or belongs to a different database—is communicated via a secondary error code in the stack.
3. Scenario I: Temporal Divergence (ORA-01207)
The combination of ORA-01122 and ORA-01207: file is more recent than control file - old control file indicates a specific directional inconsistency in the timeline: the physical datafile has advanced beyond the knowledge of the Control File.
3.1 Mechanism of Failure
This scenario typically arises during manual disaster recovery attempts. Consider a situation where a database crashes, and the current control files are lost or corrupted. The administrator restores a backup of the control file taken continuously (e.g., a binary backup from the previous night).
- Control File State: The restored control file records a Checkpoint SCN of 1000. It expects the datafiles to be at or near SCN 1000.
- Datafile State: The live datafiles on disk were active up until the crash at SCN 2000.
- The Conflict: During startup, the kernel reads the datafile header and finds a Checkpoint SCN of 2000. It compares this to the Control File's expectation of 1000. Since the Control File is supposed to be the master record, finding a "future" file violates the causality principle of the restore process.
3.2 Recovery Protocol: Synchronizing Metadata
Since the datafiles contain valid, committed data that is more recent than the control file, the objective is to update the control file to reflect the reality of the datafiles, rather than rolling back the datafiles.
Step 1: Backup Control File to Trace
If the database can be mounted, generate a script to recreate the control file:
ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/tmp/recreate_ctl.sql';
Step 2: Recreate the Control File
The database must be shut down and started in NOMOUNT mode. The script generated in Step 1 is then executed. This action forces the database to accept the datafiles "as is" and resets the Control File's metadata to match the highest SCN found in the file headers.
Step 3: Media Recovery
Even after recreating the control file, the database is technically in a state of inconsistency because the files may be "fuzzy" (containing changes from uncommitted transactions):
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
Typically, the necessary redo is already in the online logs. When prompted for an archive log,
the administrator can simply type AUTO or point to the online redo logs.
Step 4: Open Resetlogs
Because the control file was recreated (which essentially creates a new timeline or incarnation logic), the database must be opened with RESETLOGS:
ALTER DATABASE OPEN RESETLOGS;
4. Scenario II: Storage Subsystem Consistency Failures (ORA-01208)
The error ORA-01208: data file is an old version - not accessing current version represents a far more insidious problem than ORA-01207. While ORA-01207 implies the file is too new (which is good for data loss minimization), ORA-01208 implies the file is too old—significantly older than what the control file expects, often trailing by days or weeks.
This error is a hallmark of Storage Area Network (SAN) configuration errors, specifically involving snapshotting, remote mirroring, or multipathing ghost devices.
Case Study: The zLinux "Shadow Copy" Incident
Environment:
- Platform: IBM zLinux running Red Hat Enterprise Linux (RHEL) 5.8
- Database: Oracle 11.2.0.3 RAC
- Storage: Hitachi USP1100 via FICON channels
- Topology: 2 Nodes (LPARs)
The Incident:
Following a scheduled OS kernel upgrade and server reboot, the database instance on Node 2 refused to start, citing ORA-01122 and ORA-01208 for random datafiles. The error persisted intermittently across reboots, affecting different files each time.
Forensic Analysis:
The error ORA-01208 indicated that the Checkpoint SCN in the datafile header was far lower than the Checkpoint SCN in the Control File:
- Control File Expectation: SCN 5,000,000 (Current)
- Datafile Header Reality: SCN 1,000,000 (Weeks old)
This massive discrepancy suggested that the file being accessed by the OS was not the live production file but a stale copy. Further investigation revealed Duplicate Volume Identifiers: during a migration testing phase, "Shadow Copy" volumes (snapshots) were presented to the server but never unmasked. Upon reboot, the Linux multipathing software occasionally bound the device path to the stale "Shadow Copy" LUN instead of the active production LUN.
Resolution:
Physically unmasking and removing the "Shadow Copy" volumes from the SAN zone visible to the database servers resolved the issue.
Case Study: The Broken Mirror Disaster Recovery Drill
The Incident:
A customer using HDS remote mirroring attempted to activate the DR site by "breaking" the mirror. Upon startup, the database failed with ORA-01122 and ORA-00600. The ORA-600 signifies that the redo log stream contains vector changes that are inconsistent with the block versions on disk ("Stale Write" or "Lost Write" detection).
Root Cause: Lack of Consistency Groups
Storage replication can be synchronous or asynchronous. In asynchronous modes, write ordering must be preserved across all LUNs (Data, Log, Control). If the storage system does not utilize a Consistency Group, the "Break Mirror" operation results in a fractured database state:
- Control File LUN: Timestamp T
- Datafile 1 LUN: Timestamp T+2 seconds
- Redo Log LUN: Timestamp T-5 seconds
Conclusion: Oracle cannot recover from a storage state that violates write-order fidelity without a valid backup. The only remediation was to restore from a standard RMAN backup.
5. Scenario III: Physical Corruption and File Truncation (ORA-01200)
ORA-01200: actual file size of X is smaller than correct size of Y blocks indicates a physical discrepancy. The Control File (and the file header) believes the file should be a certain size based on previous successful space allocation operations (e.g., auto-extend). However, the Operating System's file system reports a smaller size.
5.1 Root Causes
- Failed Copy Operations: A file transfer (SCP, FTP, CP) was terminated mid-stream due to network failure or "Disk Full" errors, leaving a truncated file.
- OS/File System Errors: Corruption in the inode table or file system metadata.
- Human Error: Accidental redirection (
> datafile.dbf) or truncation commands.
5.2 The "dd" Remediation Technique (NOARCHIVELOG Mode)
In a production environment with ARCHIVELOG mode enabled, the standard response is to restore the datafile from backup and recover it. However, if the database is in NOARCHIVELOG mode and no valid backup exists, the situation is dire.
This is an undocumented procedure to force the database open by manually "patching" the missing
file space using the Unix dd utility. This method assumes that the missing blocks at
the end of the file are likely empty or that losing them is acceptable.
The Procedure:
- Identify the Discrepancy:
ORA-01200: actual file size of 64000 is smaller than correct size of 65600 blocks Current Blocks: 64,000 Required Blocks: 65,600 Missing Blocks: 1,600 Block Size: 8192 bytes - Backup the Corrupt File: Copy the truncated file to a safe location.
- Synthesize the Missing Blocks:
dd if=/dev/zero of=/u02/oradata/users01.dbf bs=8192 seek=64001 count=1600 conv=notruncif=/dev/zero: Source of zero bytesseek=64001: Skip the first 64,000 blocks and start writing at block 64,001count=1600: Write exactly 1,600 blocksconv=notrunc: Do not truncate the file; append to it
- Verification and Salvage: The database should mount and open.
Immediately perform a logical export (
expdp) of all objects in that tablespace. If Oracle attempts to read data from the "patched" zero-blocks, it will throw ORA-01578: ORACLE data block corrupted.
6. Scenario IV: Identity and Version Mismatches (ORA-01206 & ORA-01251)
6.1 ORA-01206: Wrong Database ID
Every Oracle Database is assigned a unique Database Identifier (DBID) upon creation. This ID is stamped into the Control File and every Datafile Header. ORA-01206: file is not part of this database - wrong database id occurs when these IDs do not match.
The RMAN Duplicate Artifact
This error is frequently observed after cloning a database using RMAN DUPLICATE or restoring a backup to a new server. RMAN assigns a new DBID to the duplicated database. However, if a tablespace in the source database was READ ONLY or OFFLINE during the backup or duplication process, RMAN may optimize the operation by not rewriting the file header of that specific file.
Consequently, the target database has a Control File with DBID_NEW, but the Read-Only datafile still contains DBID_OLD.
Remediation Strategy
- Mount the database.
- Change the tablespace status to READ WRITE:
ALTER TABLESPACE <tablespace_name> READ WRITE;This command forces a checkpoint and header update. The kernel writes the current (DBID_NEW) into the header, resolving the mismatch.
- If required, switch it back to READ ONLY.
6.2 ORA-01251: Unknown File Header Version
ORA-01251 indicates that the data read from the file header does not conform to a known Oracle block format. This is effectively a "Garbage Header" error.
Root Causes:
- Severe Corruption: The first block of the file has been overwritten by non-Oracle data (e.g., fsck repair, human error).
- Platform Endianness Mismatch: Moving a file from a Little Endian system (Linux x86) to a Big Endian system (AIX/Solaris) without using RMAN CONVERT or Data Pump.
- Partial Restoration: A restore process that failed before writing the header block.
In most cases of ORA-01251, the file is unusable and must be restored from backup. If no backup exists, the data is likely lost unless raw data extraction tools (DUL/DBRECOVER) are employed.
7. Cloud and Modern Infrastructure Considerations
In modern cloud and virtualized environments, ORA-01122 manifests with unique characteristics that require specific diagnostic approaches and remediation strategies.
7.1 AWS EBS Snapshot Inconsistencies
Amazon Elastic Block Store (EBS) snapshots are crash-consistent by default, not application-consistent. When restoring Oracle databases from EBS snapshots:
- The Problem: If the database was actively writing during snapshot creation, restored datafiles may have different SCN points across volumes.
- Symptoms: ORA-01122 with ORA-01207 or ORA-01208 after restoration.
- Solution: Use AWS VSS (Volume Shadow Copy Service) integration for Windows, or put the database in hot backup mode before taking snapshots on Linux.
-- Before AWS EBS snapshot on Linux
ALTER DATABASE BEGIN BACKUP;
-- Take snapshot via AWS CLI or Console
-- After snapshot completes
ALTER DATABASE END BACKUP;
ALTER SYSTEM ARCHIVE LOG CURRENT;
7.2 Azure Managed Disk Considerations
Azure VM snapshots face similar challenges. For Oracle databases on Azure:
- Multi-Disk Consistency: If data, redo, and control files are on separate managed disks, snapshot timing differences can cause ORA-01122.
- Recommendation: Use Azure Backup with application-consistent snapshots, or implement Oracle RMAN for backup instead of relying solely on disk snapshots.
7.3 Oracle Cloud Infrastructure (OCI)
OCI provides native Oracle integration but still requires attention:
- Block Volume Snapshots: Use OCI's crash-consistent group snapshots for all volumes associated with a database.
- Autonomous Database: ORA-01122 is largely abstracted away in ADB, but can still occur during manual Data Guard operations.
7.4 Kubernetes and Container Environments
Oracle databases in containers (Docker/Kubernetes) introduce additional complexity:
- Persistent Volume Claims (PVC): If PVCs for datafiles and control files are backed by different storage classes, snapshot inconsistencies can occur.
- StatefulSet Restores: Restoring from volume snapshots during pod rescheduling can lead to ORA-01122 if not coordinated properly.
- Best Practice: Use CSI (Container Storage Interface) drivers that support application-consistent snapshots, or always use RMAN for backup/restore.
7.5 ASM (Automatic Storage Management) Environments
ORA-01122 in ASM environments requires additional diagnostic steps:
ASM-Specific Diagnostics
-- Check ASM disk group status
SELECT name, state, type, total_mb, free_mb FROM v$asm_diskgroup;
-- Verify ASM disk consistency
SELECT group_number, disk_number, name, path, header_status, mode_status
FROM v$asm_disk
WHERE header_status != 'MEMBER';
-- Check for ASM disk header issues
ASMCMD> lsdsk -k -G DATA
In ASM environments, ORA-01122 can occur after improper ASM disk group operations, such as adding/removing disks during rebalance or recovering from disk failures. Always ensure ASM rebalance operations complete before taking backups.
8. Deep Dive Case Study: The Dongfeng Motor Incident
This case study illustrates the escalation from standard recovery to the use of "nuclear" options when standard backups fail.
Incident Profile
- Client: Dongfeng Motor
- System: SCM and SOADB databases
- Trigger: Storage disaster recovery switching event
- Initial Error: ORA-01122, ORA-01110, ORA-01207 (File newer than control file)
The Recovery Attempt
- Standard Analysis: The engineers identified that the control files were outdated relative to the datafiles (Scenario I).
- Backup Failure: They attempted to restore from backup (
RMAN> list backup...), but discovered that the backups for specific datafiles (e.g., file 98) were missing or corrupt. This rendered standard recovery impossible. - Control File Recreation: They proceeded to recreate the control file using
CREATE CONTROLFILE REUSE DATABASE... RESETLOGS. - The Dead End: Upon attempting
ALTER DATABASE OPEN RESETLOGS, the database failed with ORA-01113: file 1 needs media recovery. This confirmed that the system tablespace (file 1) was inconsistent and required redo application, but valid redo logs or archives were unavailable.
The "Nuclear" Solution: Undocumented Parameters
Facing total data loss, the engineers utilized Oracle's undocumented corruption-allowance parameters. These parameters instruct the kernel to ignore consistency checks and force the database open, accepting that logical corruption may exist.
These parameters should only be used as a last resort when all other options have been exhausted. A database opened this way is unsupported and potentially unstable.
Configuration
The spfile was converted to a pfile, and the following parameters were added:
_allow_resetlogs_corruption = true
_offline_rollback_segments = (_SYSSMU1$, _SYSSMU2$,... _SYSSMU10$)
_corrupted_rollback_segments = (_SYSSMU1$, _SYSSMU2$,... _SYSSMU10$)
undo_management = MANUAL
Rationale
- _allow_resetlogs_corruption: Bypasses the SCN consistency check during OPEN RESETLOGS.
- _corrupted_rollback_segments: Marks the undo segments as corrupt. Since the database was likely crashed with active transactions, forcing it open without applying redo means those active transactions cannot be rolled back (undo is missing/inconsistent). By marking the segments as corrupt and setting undo to MANUAL, the engineers prevented SMON from attempting to roll back these "zombie" transactions, which would otherwise crash the instance immediately.
Outcome
The database successfully opened. The engineers immediately recreated the undo tablespaces
(drop tablespace undotbs1, create undo tablespace...) to restore
transactional integrity for new transactions. A logical export (expdp) was performed
immediately to migrate the data to a clean database, as a database opened via
_allow_resetlogs_corruption is unsupported and unstable.
9. Advanced Tools and Methodologies
When the database cannot be opened even with undocumented parameters, forensic recovery moves to tools that bypass the SQL engine entirely.
8.1 DUL (Data Unloader) / DBRECOVER
Tools like Oracle's internal DUL or DBRECOVER read the raw datafiles directly. They understand the binary format of Oracle blocks (block headers, row directories, row pieces) and can extract data from files that are otherwise "corrupt."
- Mechanism: These tools scan the datafile payload, ignoring the file header consistency checks. They reconstruct tables based on the obj# (Object ID) found in the block headers and match them against a dictionary (if available) or heuristics.
- Use Case: This is the recovery method of last resort when ORA-01122 is caused by extensive header corruption or total loss of the SYSTEM tablespace.
When all standard and emergency recovery methods fail, DBRECOVER can extract data directly from corrupted or inconsistent datafiles without requiring the Oracle instance to be running. Learn more about DBRECOVER for Oracle →
8.2 BBED (Block Browser and Editor)
While largely deprecated and removed in modern versions (12c+), BBED was historically used to manually patch SCNs in datafile headers to match the control file.
- Technique: An expert would read the Control File checkpoint SCN and manually update the offset in the Datafile Header (Block 1) to match it, essentially "faking" consistency to pass the ORA-01122 check.
- Risk: Extremely dangerous and requires calculating checksums manually.
10. Diagnostic Checklist and SQL Reference
For DBAs encountering ORA-01122, the following checklist and diagnostic queries provide a structured approach to diagnosis and resolution.
Phase 1: Initial Assessment
- Identify Secondary Error: Check alert log for the accompanying error (ORA-01207, ORA-01208, ORA-01200, ORA-01206, or ORA-01251).
- Note the Affected File: Record the file number and path from ORA-01110.
- Check Control File Type: Determine if using current or backup control file.
Phase 2: SCN Analysis
-- Compare Control File vs Datafile Header SCNs
SELECT
d.file#,
d.name,
d.checkpoint_change# as "Control File SCN",
h.checkpoint_change# as "Header SCN",
CASE
WHEN h.checkpoint_change# > d.checkpoint_change# THEN 'FILE AHEAD (ORA-01207)'
WHEN h.checkpoint_change# < d.checkpoint_change# THEN 'FILE BEHIND (ORA-01208)'
ELSE 'SYNCHRONIZED'
END as "Status"
FROM v$datafile d, v$datafile_header h
WHERE d.file# = h.file#
ORDER BY d.file#;
-- Check for Fuzzy Files
SELECT file#, status, error, fuzzy, checkpoint_change#, checkpoint_time
FROM v$datafile_header
WHERE fuzzy = 'YES' OR error IS NOT NULL;
-- Verify Database ID Consistency
SELECT
h.file#,
h.name,
h.dbid as "Header DBID",
(SELECT dbid FROM v$database) as "Database DBID",
CASE WHEN h.dbid != (SELECT dbid FROM v$database)
THEN 'MISMATCH (ORA-01206)'
ELSE 'OK'
END as "Status"
FROM v$datafile_header h;
Phase 3: File Size Verification
-- Check for Size Discrepancies (ORA-01200)
SELECT
d.file#,
d.name,
d.bytes/1024/1024 as "Expected MB",
h.bytes/1024/1024 as "Actual MB",
(d.bytes - h.bytes)/1024/1024 as "Difference MB"
FROM v$datafile d, v$datafile_header h
WHERE d.file# = h.file#
AND d.bytes != h.bytes;
-- OS-Level File Size Check (run from OS)
-- ls -la /u01/oradata/*.dbf
Phase 4: Control File Information
-- Control File Details
SELECT name, value FROM v$controlfile;
-- Control File Record Counts
SELECT type, record_size, records_total, records_used
FROM v$controlfile_record_section
WHERE type IN ('DATAFILE', 'REDO LOG', 'ARCHIVED LOG');
-- Database Incarnation History
SELECT incarnation#, resetlogs_change#, resetlogs_time,
prior_resetlogs_change#, status
FROM v$database_incarnation
ORDER BY incarnation#;
Phase 5: Recovery Requirements
-- Files Requiring Recovery
SELECT * FROM v$recover_file;
-- Archive Log Gap Analysis
SELECT thread#, sequence#, first_change#, next_change#
FROM v$archived_log
WHERE sequence# >= (
SELECT MIN(checkpoint_change#) FROM v$datafile_header
)
ORDER BY thread#, sequence#;
-- Online Redo Log Status
SELECT group#, sequence#, bytes/1024/1024 as "Size MB",
members, archived, status, first_change#
FROM v$log
ORDER BY sequence#;
Key Diagnostic Views Reference
| View Name | Key Columns | Purpose |
|---|---|---|
V$DATAFILE |
FILE#, CHECKPOINT_CHANGE#, BYTES | Control file's view of datafiles |
V$DATAFILE_HEADER |
FILE#, CHECKPOINT_CHANGE#, DBID, FUZZY | Physical file header information |
V$DATABASE |
DBID, CONTROLFILE_TYPE, RESETLOGS_CHANGE# | Database identity and control file type |
V$RECOVER_FILE |
FILE#, ONLINE_STATUS, ERROR, CHANGE# | Files requiring media recovery |
V$DATABASE_INCARNATION |
INCARNATION#, RESETLOGS_CHANGE# | Database timeline history |
RMAN Recovery Commands Reference
-- Validate Specific Datafile
RMAN> VALIDATE DATAFILE 4;
-- Restore and Recover Single Datafile
RMAN> SQL "ALTER DATABASE DATAFILE 4 OFFLINE";
RMAN> RESTORE DATAFILE 4;
RMAN> RECOVER DATAFILE 4;
RMAN> SQL "ALTER DATABASE DATAFILE 4 ONLINE";
-- Restore Control File from Autobackup
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
-- Recreate Control File from RMAN Catalog
RMAN> RESTORE CONTROLFILE FROM TAG 'daily_backup';
-- Complete Database Recovery with Backup Control File
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;
RMAN> ALTER DATABASE OPEN RESETLOGS;
11. Prevention and Architectural Best Practices
The analysis of ORA-01122 incidents highlights that prevention is primarily an architectural challenge, not just an operational one.
9.1 Storage Architecture
- Consistency Groups: When using SAN replication, all LUNs associated with a single database (Data, Log, Control) must be in the same Consistency Group. This guarantees that if the link fails, the remote copy is "crash consistent"—all IOs up to timestamp T are present, and no IOs after T are present.
- LUN Masking: Strict zoning and LUN masking must be employed to ensure that snapshot/shadow volumes are never visible to the host OS during normal boot sequences.
9.2 Operational Procedures
- RMAN Validation: Regular execution of
BACKUP VALIDATE DATABASEensures that physical corruption is detected early. - Test Restores: The ORA-01206 (Wrong DBID) error is almost exclusively discovered during restores. Regular DR drills are the only way to verify that the recovery procedures are sound.
- Avoid "cp": The use of OS commands (cp, scp, rsync) to move datafiles is a leading cause of ORA-01200 (truncation) and ORA-01207 (inconsistent versions). RMAN should always be the transport mechanism for datafiles.
Conclusion
The error ORA-01122 is a definitive assertion by the Oracle kernel that the physical reality of the storage does not align with the logical timeline of the database. It is a protective mechanism designed to prevent the processing of data that cannot be guaranteed to be consistent.
While the error message itself is generic, the accompanying secondary errors—ORA-01207 (Time Divergence), ORA-01208 (Stale Storage), ORA-01200 (Physical Truncation), and ORA-01206 (Identity Mismatch)—provide the necessary forensic evidence to diagnose the root cause.
Remediation strategies exist for each scenario, ranging from the non-invasive (Control File Recreation)
to the destructive (Undocumented Parameters). However, the prevalence of these errors in relation
to storage mirroring and snapshot technologies underscores the critical need for "Database-Aware"
storage architectures and rigorous, validated backup strategies. In the absence of these, DBAs
are left with tools like dd and _allow_resetlogs_corruption, which
salvage data at the cost of logical integrity.
Expert Assistance
For complex ORA-01122 recovery scenarios, especially when backups are unavailable and data must be recovered, our experts are available to help. Contact us at [email protected]