Recovery with Archiving  «Prev  Next»

Lesson 8

Oracle AI Database 26ai ARCHIVELOG Recovery: Module Conclusion

This module developed a practical approach to complete recovery in Oracle AI Database 26ai. You examined what survives an instance failure, how archived redo extends recovery beyond an older backup, and how the affected files determine the required database state.

The seven workflow lessons connect diagnosis, recovery planning, command selection, and application verification. Together, they show why recovery begins with identifying the failure and the intended result. An instance crash, a lost datafile, and an unwanted committed update require different decisions, even when users describe each incident as a database outage.

You should now be able to explain the recovery inputs, select an appropriate scope, distinguish CDB and PDB states, and recognize when recovery has restored usable service. The following review brings those decisions together.

Lesson 1: ARCHIVELOG Preserves Recovery Possibilities

The introduction to recovery with archiving established the purpose of complete media recovery. A datafile backup supplies an earlier physical copy. Archived redo, surviving online redo, and applicable incremental backups provide recovery information that can advance that copy to the current required consistency point.

ARCHIVELOG preserves completed redo sequences after online log groups are reused. Multiplexing online redo protects against loss of individual members, while archiving retains a longer change history. These protections serve different purposes, and neither replaces usable datafile backups.

The newest required changes may still exist only in online redo. Protecting archived logs while losing essential online redo can therefore leave complete recovery impossible. Enabling ARCHIVELOG is a prerequisite for the module's usual media-recovery procedures, not a guarantee that every required recovery input will survive.

A NOARCHIVELOG database normally depends on a usable consistent backup for recovery from physical file loss. ARCHIVELOG enables recovery beyond an older backup when the necessary history remains available. The practical lesson is to protect the entire recovery path, including backups, redo, metadata, storage access, and keys.

Lesson 2: Identify What Failed Before Restoring

The implications of instance failure explained why losing memory does not automatically lose committed transactions. An instance contains memory structures and background processes; the database also has persistent files. A crash can interrupt the instance while leaving those files intact.

With normal synchronous commit behavior, redo and the commit record become durable before Oracle acknowledges the commit. The changed data blocks need not all have reached their datafiles. Online redo can reconstruct committed changes after the buffer cache is lost.

Instance recovery first rolls forward the required recorded changes, including changes associated with uncommitted transactions. Undo then removes uncommitted work. Transaction rollback can continue after the database opens. Oracle coordinates this process automatically when the required current files survive, in both ARCHIVELOG and NOARCHIVELOG modes.

Physical file loss requires a different response. Restarting cannot recreate a missing datafile from memory. An unwanted committed update is different again: ordinary instance recovery preserves committed work, including a logically incorrect update. Evaluate correction, an appropriate Flashback feature, or point-in-time recovery for that problem.

Recovery time depends on the work required and available resources. Checkpoint progress, redo volume, transaction rollback, storage performance, startup, and application reconnection all matter. A configured instance-recovery time target does not guarantee total service restoration time.


Oracle AI Engineering

Lesson 3: Separate Target, Scope, and State

The review of recovery methods organized recovery around three decisions. The target identifies the required endpoint. Scope identifies the affected CDB, PDB, tablespace, datafile, table, or blocks. State identifies which operations can proceed and what remains available.

Complete recovery applies the information needed for the current required consistency point. Point-in-time recovery deliberately selects an earlier endpoint. Reaching the last log found in one directory does not establish that complete recovery has succeeded.

Scope determines which files or objects need attention. Eligible block corruption can sometimes be repaired without restoring the whole datafile. RMAN table recovery can recover supported objects through an auxiliary environment and Data Pump. These methods have their own prerequisites and should not be treated as interchangeable file-restoration commands.

State provides the operating context. NOMOUNT starts the instance without mounting a control file. MOUNT makes control-file metadata available while the database remains closed to normal application access. OPEN can coexist with offline application datafiles.

A PDB reported as MOUNTED is closed within its CDB; it does not imply that the CDB root is also only mounted. Likewise, a file reported ONLINE does not prove every block is healthy. Identify the object whose state you are reading before deciding what the result means.

Lesson 4: Treat Complete Recovery as a Controlled Sequence

The complete recovery operation brought the concepts into an ordered procedure: diagnose, confirm recovery inputs, establish the required state, restore affected files, recover them, return the appropriate scope to service, and verify the result.

RESTORE and RECOVER remain separate operations. A successful restore retrieves an earlier copy; recovery must still advance it. A backup record in the RMAN repository does not prove the backup contents are readable or that every later required redo sequence is available.

RMAN coordinates restoration from its supported backup formats and can retrieve required archived logs from accessible backups. SQL*Plus supports user-managed recovery of files already restored through a suitable procedure. SQL*Plus cannot unpack an RMAN backup set.

SQL*Plus AUTOMATIC selects expected archived-log filenames. It does not fetch missing backups or guarantee that recovery will never prompt. SET LOGSOURCE and RECOVER FROM provide alternative ways to identify staged log locations; they do not change future archive destinations.

The final command depends on the operation. Complete recovery with the current control file normally permits ordinary opening. Recovery with a backup control file requires RESETLOGS, as does database point-in-time recovery. Returning an offline file online in an already open database is another distinct final action.

Lesson 5: Recover While the Database Remains Mounted

Closed database recovery addressed damage that requires the relevant database to remain closed during recovery. The module's example concerns a CDB-root SYSTEM datafile, whose role differs from an ordinary application file that can remain offline while other data is used.

The instance runs during mounted recovery. It reads the control file and performs recovery work even though applications cannot use the database normally. Closed recovery describes this operating state, not a requirement to restore every file.

Restore only the files that need restoration, preserve useful current files, apply the required recovery information, and open after recovery succeeds. RMAN can restore while mounted. A user-managed procedure may copy a valid physical backup into place while the instance is stopped, then mount and recover it.

An orderly shutdown is appropriate when needed and possible. SHUTDOWN ABORT and STARTUP FORCE are not mandatory steps. A temporary storage-access problem with intact files may require access repair and further state checks instead of replacement from backup.

Lesson 6: Recover an Offline File in an Open Database

Recovery when the database is initially open demonstrated isolating an eligible user datafile while the CDB and affected PDB remain open. The worked example used APPPDB, file 12, and USERS, with actual identities requiring verification.

SQL*Plus connected to APPPDB identifies the file and manages its offline/online state. A separate RMAN session connected to CDB$ROOT restores and recovers the PDB datafile by its verified file number. A container switch in one session does not change another session's connection.

The sequence is offline, restore, recover, online. No ALTER DATABASE OPEN statement is needed because the database remains open. Complete datafile recovery in this scenario also does not require RESETLOGS.

The availability benefit has limits. Unaffected data can remain accessible, but queries and transactions depending on the offline file may fail. Taking an entire tablespace offline expands that impact. Choose the smallest appropriate scope while accounting for application dependencies.

Lesson 7: Reopen Unaffected Data Before File Recovery

Open recovery from an initially closed database changed the starting state. An outage leaves the instance stopped, but diagnosis establishes that usable database resources can reopen before restoration and recovery of an eligible damaged application file.

The multitenant example separates root opening from PDB opening. Mount and diagnose at CDB$ROOT. If the root's opening requirements are satisfied, open it and inspect PDB states. In the affected PDB, isolate the identified file and open the remaining usable PDB scope when permitted.

RMAN can then restore and recover the offline file while unaffected functions operate. The final action returns that file online. This differs from keeping the database mounted throughout media recovery and opening only afterward.

Partial availability is conditional. Critical-file damage, additional consistency requirements, or other startup errors may prevent the proposed opening. Saved PDB state also affects what opens automatically. Inspect actual states and service needs rather than mechanically repeating startup and opening commands.

Choose the Response That Fits the Evidence

Module 4 Recovery Decisions
Evidence Recovery direction Key condition
Instance stopped; current files remain usable. Correct the cause and allow automatic instance recovery as needed. Required current files and online redo survive.
Critical or widespread datafile damage. Use the appropriate mounted restore-and-recover procedure. Required backups and recovery inputs are available.
Eligible application file lost; database open. Isolate, restore, recover, and return the file online. The remaining database scope can operate.
Database initially closed; eligible damage can be isolated. Reopen usable resources before recovering the offline file. Root and PDB opening requirements are satisfied.
Unwanted committed change in intact data. Evaluate correction, Flashback, or point-in-time recovery. The selected scope and earlier target are recoverable.

A missing log at one location is an access problem to investigate. Another archive destination, backup, or usable incremental recovery path may supply what is needed. If required information remains unavailable, reassess the endpoint and consequences; a RESETLOGS command cannot bypass unfinished recovery.

Apply the Distinctions to Three Incidents

First, suppose a server loses power while transactions are running, but storage survives. Some committed blocks existed only in memory when power failed. That fact alone does not justify restoring a backup: durable online redo can reconstruct those changes during instance recovery. After reopening, check services and resolve requests whose commit outcomes were uncertain.

Second, suppose APPPDB loses an eligible user datafile while its remaining files remain usable. Identify the file and take it offline before replacing its contents. Restore and recover only the required scope, then bring it online. If the outage also stopped the instance, first determine whether the root and remaining PDB data can reopen under Lesson 7's conditions.

Third, suppose an application commits an incorrect update while every file remains intact. Complete media recovery aims to retain committed history, so it does not selectively remove that update. Choose a correction or an appropriate historical recovery method, and assess wanted changes that would also be excluded by an earlier target.

Across these incidents, the decisive evidence concerns persistent-file health, the intended endpoint, and dependencies. Neither the word “crash” nor the presence of an archived-log directory identifies the full procedure. State the failure category, target, and affected scope before deciding which commands are appropriate.

Remember the Limits of Flashback and Special Recovery

The module compared Flashback Database with backup-based point-in-time recovery. Flashback Database rewinds existing datafiles using available flashback history and redo. It can avoid restoring datafiles and is often faster when applicable, but it cannot replace a lost physical file or serve as a substitute for backups.

Flashback Query and Flashback Table have different purposes and prerequisites. A normal restore point names a target without preserving every required input. A guaranteed restore point provides stronger retention behavior under its requirements, while still consuming storage and remaining distinct from a backup.

Lesson 3 also identified a limited exception for an eligible datafile lost before its first backup. Reconstruction requires file metadata and all necessary redo since creation; unrecoverable NOLOGGING changes or missing redo can prevent success. SYSTEM datafiles cannot be reconstructed through that empty-file mechanism. This exception is not a backup strategy.

Verify Recovery Inputs and Results Separately

Recovery confidence requires more than one kind of evidence. RMAN reporting describes repository information. Restore preview identifies expected backup selection. Restore validation reads selected backup contents without writing restored datafiles. Validation of current database files addresses a different question again.

V$DATAFILE maps file numbers, containers, filenames, and status. V$DATAFILE_HEADER reports header information. V$RECOVER_FILE reports recorded media-recovery requirements but can be unreliable with a restored or re-created control file. V$ARCHIVED_LOG and V$RECOVERY_LOG do not prove that physical log copies are readable.

Keep column meanings distinct. ONLINE_STATUS belongs to V$RECOVER_FILE; STATUS in V$DATAFILE describes file state. AVAILABLE in DBA_DATA_FILES is not a guarantee of online status or physical health. Missing header information in an outer join must be investigated.

Operational verification includes intended PDB modes, services, scheduled jobs, connections, and representative business operations. Reconcile uncertain commit outcomes before retrying requests. A transaction may have committed before its confirmation was lost, so blanket resubmission can duplicate work.

Protect the Next Recovery Opportunity

Backup terminology also affects planning. Whole versus partial describes scope; full versus incremental describes the backup approach; backup sets versus image copies describes format. A full backup of one datafile is not a whole-database backup, and an ordinary full backup is not an incremental level 0 parent.

An online backup is normally inconsistent because changes occur during backup. That is expected, not proof of corruption: required recovery information makes restored files consistent at the selected endpoint. A shutdown-consistent backup provides a different starting state, but reaching a later target still requires the necessary changes.

If a backup job was interrupted, determine which backup sets completed successfully. RMAN does not select partial backups as restore candidates. Do not assume that applying redo turns arbitrary incomplete backup output into a usable backup.

Protect datafile backups, archived redo, control-file backups, and startup configuration. Preserve encryption keys, backup passwords, password files, network/service configuration, media-management access, and storage credentials as applicable. RESTORE DATABASE does not recreate every external dependency.

Keep recoverable copies beyond the primary storage failure domain. Monitor archive destinations and recovery-area capacity, and retain logs according to recovery requirements. A completed backup job or an intact backup directory is not proof that the whole service can be recovered.

Document recovery timings, failed dependencies, file relocations, and verification outcomes. Resume scheduled protection and decide whether additional backups are appropriate after the incident. Use periodic recovery rehearsals to test the complete path through application access.

Recovery with Archiving Glossary

Instance failure
An interruption of Oracle's running memory structures and processes; persistent files may remain intact.
System global area (SGA)
Shared instance memory containing structures such as the database buffer cache, shared pool, and redo log buffer.
Media recovery
Application of recovery information to datafiles that require it, commonly after physical restoration.
Restore
Retrieve a usable earlier physical file copy from backup.
Complete recovery
Apply all recovery information required to bring the affected files to the current required consistency point.
Archived redo
Retained copies of completed online redo sequences, used to preserve recovery history beyond online log reuse.
Undo
Information used to reverse changes and support consistent reads; it also enables rollback of uncommitted work during recovery.
SCN and checkpoint
An SCN orders database changes; checkpoint information records progress relevant to consistency and where recovery begins.
Point-in-time recovery
Recovery of a supported scope to a selected earlier state, with changes after that target excluded.

Apply the Module as One Recovery Plan

Having completed the module, you should be able to:

  • Distinguish automatic instance recovery from media recovery and the correction of logical errors.
  • Explain how backups, archived redo, online redo, and undo contribute to recovery.
  • Select a recovery target and scope supported by the available recovery information.
  • Identify the CDB, PDB, and datafile states required by the chosen procedure.
  • Explain when mounted recovery is necessary and when unaffected data can remain available.
  • Choose the appropriate opening or ONLINE operation without treating RESETLOGS as a shortcut.
  • Verify the recovered files, application service, and continuing backup protection before closing the incident.

Before running restore commands, be able to state what failed, which container and files are affected, the required endpoint, and the expected application impact. Confirm the backup and redo path, establish the necessary states, and preserve useful current information.

Then execute the chosen procedure in controlled stages. Distinguish restored from recovered, open from fully available, and successful database commands from restored application service. These distinctions connect the module's technical lessons to the outcome that matters to users.


Complete Database Recovery - Quiz

Click the Quiz link below to test your knowledge about complete database recovery.
Complete Database Recovery - Quiz

SEMrush Software 7 SEMrush Banner 7