| Lesson 9 | Recovering without the current redo log |
| Objective | Diagnose current redo loss, evaluate available recovery paths, and demonstrate whole-CDB RMAN recovery to a verified boundary before unavailable redo. |
The current online redo log contains recent changes that may be essential to recover the database. If required redo becomes permanently unavailable, restoring data files alone cannot recover those changes. Database point-in-time recovery (DBPITR) can restore an earlier consistent state, but committed work beyond the selected boundary is excluded.
This lesson demonstrates whole-CDB RMAN recovery in ARCHIVELOG mode after loss of the required current redo has been confirmed. The example assumes one redo thread, a usable current control file and SPFILE, and suitable earlier backups. Diagnose the failure and evaluate other recovery sources before selecting this procedure: one damaged redo member does not necessarily mean the group's redo is lost.
Oracle organizes online redo into groups. Each redo thread requires at least two groups, each with at least one member. Multiplexed members are copies within the same group. The log writer process, LGWR, writes to the current group and advances to another group when a log switch occurs.
A group number identifies a reusable storage group. A sequence number identifies a particular use of that group within a redo thread and incarnation. In this lesson, group 2 contains sequence 482 at diagnosis. It will not always contain sequence 482.
| Status | Meaning |
|---|---|
CURRENT | The group currently used by LGWR; its redo may be required for instance recovery. |
ACTIVE | The group is no longer current but is still needed for instance recovery. |
INACTIVE | The group is no longer needed for instance recovery. Its redo may still be needed for media recovery from a backup. |
Group status and archiving status answer different questions. An inactive group is not automatically safe to discard without considering archive availability and backup dependencies.
A database hang does not establish that current redo is damaged. Storage delays, archiving problems, and unrelated waits can also stop useful work. Review the instance's alert log, LGWR trace information, and storage errors to identify the affected files and distinguish a temporary access problem from destroyed data.
If the instance has stopped and its current control file remains usable, start it in MOUNT for diagnosis. Handle an already running or failed instance according to its actual condition. Repeated attempts to open the database are unnecessary when existing diagnostics identify the problem.
Use the correct Oracle home, local instance, and an authorized operating-system account. In this SQL*Plus example, connect to the CDB root and issue STARTUP MOUNT only when the instance is stopped:
sqlplus / as sysdba
STARTUP MOUNT;
SELECT group#, thread#, sequence#, status, archived
FROM v$log
ORDER BY thread#, group#;
SELECT group#, status, member
FROM v$logfile
ORDER BY group#, member;
V$LOG describes groups; V$LOGFILE identifies their members. Match every member of the affected group to the storage errors. These views provide metadata, not proof that every recorded file can currently be read. Preserve the findings before recovery changes the database state.
If a valid multiplexed member survives, the required redo may remain available. Oracle can continue operating despite some member failures. Restore storage access or follow the documented member-maintenance procedure for the actual group state instead of immediately restoring the whole CDB.
Do not copy a member while LGWR is writing it. Dropping members or groups has restrictions involving current or active status and archiving. A log switch alone does not establish that all maintenance is safe, and a newly added member does not supply historical redundancy until the group is reused.
Before declaring required redo unrecoverable, examine the following sources:
RMAN does not back up online redo logs. A data file backup therefore cannot recreate missing sequence 482 transactions simply because the backup completed successfully. Archive records also do not prove that the corresponding files still exist.
Evaluate Data Guard and Flashback Database where configured. A standby's transport and apply state determines what work it can preserve. Flashback requires usable history and the redo needed for its target; enabling it or having an FRA does not guarantee recovery from every redo-loss incident. Compare these options with the accepted data-loss boundary before proceeding.
CLEAR LOGFILE reinitializes redo storage. It does not reconstruct lost changes. Oracle documents clearing for eligible states, including certain inactive-group and closed-thread cases, but it is not a general remedy for a hung database or missing current redo.
Clearing unarchived redo can break recovery paths that depend on it. Options involving unrecoverable data files can also require sacrificing those files. Do not use these operations as trial commands in this example. Their prerequisites and consequences differ from restoring to an earlier boundary and opening with RESETLOGS.
The example now assumes that every relevant source has been checked, required sequence 482 remains unavailable, and whole-CDB DBPITR has been selected. The database being closed is not itself the reason for this choice. The determining facts are unavailable required redo and a verified earlier recovery path.
| Item | Selected value or condition |
|---|---|
| Scope | Whole CDB in ARCHIVELOG mode |
| Redo identity | Thread 1, group 2, current sequence 482 |
| Endpoint | Through sequence 481; sequence 482 is excluded |
| Control file and SPFILE | Current and usable |
| Recovery material | Earlier data file backups, required recovery chain, and encryption keys |
Confirm the incarnation as well as the thread and sequence. Equal sequence numbers in different RAC threads do not identify the same database recovery boundary. This single-thread example must be adapted to a verified target for a multi-thread configuration.
Application owners must understand that valid later commits across the whole recovered CDB can be lost. Finding sequence 481 is insufficient: the available backups and required recovery information must support a consistent state through that boundary.
Preserve the current state and useful diagnostic evidence before overwriting data files, wherever the incident and available storage permit. Record the selected target, affected applications, expected lost work, and reasons for choosing DBPITR. Keep the recovery materials separate from damaged storage. This preparation gives the team a way to reassess the incident if later evidence reveals another usable redo source or a different business requirement.
Keep application access stopped and the CDB mounted. Connect RMAN to the target CDB root with appropriate SYSBACKUP or SYSDBA privileges. Preserve useful incident material, confirm the target database identity, and verify that the selected backup pieces and required encryption material are accessible.
Retain the usable current control file and SPFILE. Redo loss alone does not require restoring either one. If current control files are also lost, complete the additional preparation covered in Lesson 8 before using an appropriately adapted recovery procedure.
Choose backups that can reach the target for all required data files in the whole-CDB scope, including the root and PDBs. Recovery applies changes forward. It cannot take arbitrary newer data files backward, and restoring just one file while leaving other required files beyond the target cannot establish the intended consistent database.
Backup preparation should distinguish catalog information from readable recovery material. A listed backup may have been moved, deleted, or become inaccessible through its media manager. Check the selected pieces, required logs or incrementals, storage capacity, and destination mappings. For encrypted recovery material, confirm access to the necessary keys rather than discovering the missing keystore after restoration has begun. Use the available RMAN preview and validation facilities as appropriate; an inventory alone does not verify every byte needed for recovery.
With those prerequisites satisfied, run the following illustrative RMAN block:
RUN {
SET UNTIL SEQUENCE 482 THREAD 1;
RESTORE DATABASE;
RECOVER DATABASE;
}
SET UNTIL precedes both RESTORE and RECOVER, giving backup selection and recovery the same endpoint. The sequence limit is exclusive: this example excludes sequence 482 and recovers through sequence 481 in thread 1. The command does not mean that sequence 482 is applied and then recovery stops.
RESTORE DATABASE retrieves the starting data files. RECOVER DATABASE applies eligible incremental backups and redo to reach the selected boundary. The required recovery information must be continuous; an available later archive cannot simply replace a missing required interval. Suitable incremental backups can change which archived logs are needed.
Inspect the RMAN results before proceeding. If restoration or recovery fails, investigate the missing backup, required redo, storage problem, or inconsistent target. Stopping at an error is not equivalent to reaching the requested boundary. Creating empty redo files also cannot supply the historical transactions that were lost.
Monitor from a separate session while the recovery session runs. Restore operations and redo application are different phases, so a completed restore message does not establish that media recovery has finished. Correlate RMAN output with alert-log events and, when useful, progress information from V$SESSION_LONGOPS and V$RECOVERY_PROGRESS. Empty or unchanged progress rows alone prove neither success nor failure. Investigate an apparent pause using the operation's messages and storage activity before changing the recovery plan.
Before opening, ensure that the online redo destinations needed by RESETLOGS are valid and writable. If the damaged storage is repaired, the recorded paths may remain suitable. If the old destination cannot be reused, update the affected member locations while the database is mounted.
For a missing member on conventional filesystem storage, this SQL*Plus example changes its recorded destination:
ALTER DATABASE RENAME FILE '/old_disk/oradata/CDB1/redo02a.log'
TO '/u03/oradata/CDB1/redo02a.log';
Replace both paths with the actual recorded name and intended location, and handle every affected member. The statement updates control-file metadata. It neither copies a physical file nor recovers lost redo. Moving an existing file, using ASM, or managing Oracle Managed Files requires the corresponding storage procedure.
Do not postpone destination preparation until after opening or try to solve it by dropping the current group. Once recovery has completed successfully and the destinations are ready, open the CDB:
ALTER DATABASE OPEN RESETLOGS;
RESETLOGS starts a new database incarnation and restarts redo sequence numbering. Database SCNs and the DBID do not reset to 1. The operation cannot bypass recovery consistency requirements or restore committed transactions excluded by the target.
Opening the CDB does not establish that every application PDB is open. From a root SQL*Plus session, open the intended PDBs according to the operating plan. Where the plan calls for opening all applicable PDBs, use:
ALTER PLUGGABLE DATABASE ALL OPEN;
Check the RMAN output and the correct instance's alert log, using the monitoring techniques from Lesson 5. Distinguish successful recovery, successful database opening, and correct application data. Each needs its own evidence.
Inspect CDB and PDB open states from the root:
SELECT name, open_mode FROM v$database;
SELECT name, open_mode
FROM v$pdbs
ORDER BY con_id;
Validate representative records, relationships, and expected transactions in the correct application PDBs. Compare them with the selected endpoint and retained incident evidence. An open database, or its RESETLOGS_TIME, does not by itself prove that the intended historical state was recovered.
Record the achieved recovery boundary and identify valid later work excluded by the whole-CDB recovery. Reconcile that work against authoritative business records. External payments, messages, and remote databases may retain effects no longer recorded locally, so indiscriminate re-entry can create duplicates or inconsistencies.
Restore redo redundancy across suitable independent storage and confirm that the original failure has been addressed. A fresh RMAN database backup is recommended as post-incident protection under the recovery policy. For example, after confirming normal archiving and backup destinations:
BACKUP DATABASE PLUS ARCHIVELOG;
Oracle 26ai does not require a new backup solely because RESETLOGS occurred. Earlier backups can remain usable with the necessary recovery chain and incarnation metadata. An online backup in ARCHIVELOG mode does not inherently require another shutdown. Preserve needed older recovery material according to policy instead of deleting it on the assumption that the new incarnation invalidates it.
Coordinate any standby follow or recovery procedure according to the standby's actual state. Do not assume that every standby requires rebuilding. Redo multiplexing, archive protection, tested backups, and appropriate standby arrangements address different failure risks and should be reviewed together after the incident.
Before restoring normal application access, verify the intended services and PDBs, communicate the achieved endpoint, and complete the agreed reconciliation checks. Retain the recovery transcript and validation results with the incident record. A later restore rehearsal should confirm that the revised backup and storage arrangements support the recovery objectives identified during this failure.
SQL*Plus cancel-based recovery remains an alternative after suitable user-managed restoration of the required data files and mounting the database. With the current control file assumed here, its command is:
RECOVER DATABASE UNTIL CANCEL
Apply the required redo through sequence 481 and enter CANCEL when sequence 482 is requested. Cancellation is input at the log prompt, not proof of a consistent recovery. Check the result and resolve any remaining recovery requirements before opening. Lesson 7 explains the interactive method in more detail.
RMAN has no UNTIL CANCEL clause. Its UNTIL AVAILABLE REDO option has whole-database scope, not individual data file, tablespace, or PDB scope. It does not make required gaps disappear. The explicit sequence target used in this lesson makes the selected boundary clear.
A database in NOARCHIVELOG mode requires a separate recovery plan based on suitable consistent backups and available recovery material. A NOREDO option is not a shortcut for bypassing missing required redo in this ARCHIVELOG example.
The next lesson demonstrates recovery through RESETLOGS.
Review recovery with a backup control file and recovery after losing required online redo.