A recovery design starts with the failure you must survive and the amount of data loss and downtime the application can tolerate. RMAN (Recovery Manager) restores database files and performs recovery. Build an inventory that remains usable when the original host is unavailable.
Oracle DBA Lesson 31 Part 1 — Define What a Recoverable Backup Must Protect
Two requirements, two measurements
The recovery point objective (RPO) describes acceptable data loss, often expressed as time. The recovery time objective (RTO) describes acceptable downtime for the business process. Define useful service with an application action, and time the outage through that check. See Oracle availability requirements.
- At 14:00, the entire database host and its local disks are lost. Protected copies remain accessible elsewhere.
- RPO is 15 minutes: recover committed work through at least 13:45.
- RTO is one hour: useful application service must return by 15:00.
- A consistent baseline represents 12:00. Every redo record needed from that baseline through 13:50 survives.
Restoration reconstructs data files on replacement disk storage. Recovery applies the required redo to advance the restored files. In this case, recovery through 13:50 leaves a ten-minute data-loss window, meeting the fifteen-minute limit. The one-hour service-return result must be measured separately. See complete database recovery.
The video's redo sections are conceptual coverage intervals. Actual recovery uses the correct database incarnation, recovery target, thread, and log sequences or SCNs. Clock labels alone do not establish coverage. A missing required section prevents recovery from crossing that gap from this baseline, even if later redo survives. Another suitable backup or recovery design could change the available path. Unrecoverable operations need separate consideration.
Match the backup conditions to the requirement
An open database backup requires redo to reconcile changes occurring while files are copied. ARCHIVELOG mode archives filled online redo logs. Inspect the actual archive destinations, successful archiving, retention, and accessibility through the required target. Logs and backup pieces must survive the selected failure. See backing up the database.
For NOARCHIVELOG, use a consistent database backup after a clean shutdown, taken while the database is mounted. It can restore its saved state. Under this whole-host and storage-loss assumption, later changes are lost because the local files and redo are gone. An instance failure with intact files is a different case. RMAN does not permit an inconsistent database backup in NOARCHIVELOG mode. See RMAN backup consistency.
Inventory the recovery dependencies
| Material | Purpose and protection |
|---|---|
| Database backups and required redo | Reconstruct files and advance them through the selected recovery point. Record the actual pieces and copies, their locations, and access. |
| Control-file backup | Supplies database-file descriptions and RMAN repository records. Preserve a discoverable copy. |
| Optional recovery catalog | Preserves RMAN metadata in a separate database. Protect that database and its accessibility. |
| DBID | Record the database identifier outside the lost host. With no usable control file or catalog, it helps identify the control-file autobackup to restore. |
| Startup settings | Protect the SPFILE if one is used, or the PFILE used instead. Record the actual starting configuration. |
| Password and network configuration | Protect these separately through the operating-system and configuration backup process. Include administrative access and application routing. |
| Encryption access | Retain the required keystore, master keys, or backup password securely, according to the encryption mode. Record the approved access arrangements without exposing secrets. |
RMAN supports data files, control files, the SPFILE, and archived redo. Password files, network configuration, and Oracle home contents require separate protection. A PFILE is a text configuration file to preserve separately. A working replacement also needs compatible Oracle software, capacity, and any external application files. See RMAN file scope, RMAN environment and repository, and control-file and SPFILE restoration and the DBID.
Transparent backup encryption depends on the keystore. Password-encrypted backups require their original backup password. Protect keys securely outside the planned failure, and follow the documented handling of auto-login keystores. See backup encryption.
A logical export preserves objects that can be imported. Whole-database file loss requires the physical recovery materials described above. See physical and logical backups.
Prepare an inventory
In SQL*Plus, confirm the existing connection's container and collect identity and mode:
SHOW CON_NAME
SELECT dbid, name, db_unique_name, log_mode, open_mode
FROM v$database;
SHOW PARAMETER control_files
SHOW PARAMETER spfile
SELECT name, space_limit, space_used, space_reclaimable
FROM v$recovery_file_dest;
DBID identifies the database. LOG_MODE identifies the archive model. OPEN_MODE supplies the current state. Parameter output identifies the configured control files and whether an SPFILE is in use. Inspect the actual PFILE if one is used. The recovery-area query describes its configured disk quota and usage. Absence of a configured recovery area does not rule out backups at other destinations. Locate the actual archive destinations and backup storage separately. See V$DATABASE, V$RECOVERY_FILE_DEST, and RMAN storage configuration.
Using a local RMAN connection to the CDB root:
rman target /
At the RMAN prompt:
SHOW ALL;
REPORT SCHEMA;
EXIT;
SHOW ALL lists persistent RMAN configuration and defaults, including control-file autobackup and device settings. Inspect what this environment reports. REPORT SCHEMA inventories registered files. Actual backup creation and piece identification belong to Part 02. See SHOW and REPORT.
Write an external recovery record with the agreed failure, RPO and RTO, database identity, data, control, and startup-file locations, archive destinations, protected backup locations, access arrangements, and the responsible application-verification role. Store secret values only through the secure process. The inventory contains their protected location and access procedure. Locate the required material while treating the original host as unavailable.
No comments:
Post a Comment