🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Data Management / Database Administration › Database Backup and Recovery › Lesson 4
TEC-DATA86-04 · Lesson 4 · 12 clock hours · demo

Oracle RMAN Backups and Recovery

Objective. Students will execute RMAN full and incremental backup scripts, register the database in a recovery catalog, and restore a datafile to recover from a simulated media failure.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Oracle RMAN: What It Is and Why It Matters

Recovery Manager (RMAN) is Oracle's built-in backup and recovery tool. It connects directly to an Oracle database, understands its internal structure, and automates tasks that would be error-prone if done manually. RMAN is the standard method for protecting Oracle databases in production environments, and it is central to the Oracle DBA CA and Microsoft DP-300 exam objectives that overlap with backup strategy concepts. Understanding RMAN is also directly tested in the DAMA CDMP framework under data operations and continuity planning.

Core Concepts Before You Type a Command

Target database – the Oracle database instance RMAN is backing up or recovering. You must connect to it with a user who has the SYSDBA or SYSBACKUP privilege.

Recovery catalog – an optional but highly recommended separate Oracle schema that stores RMAN metadata: backup history, datafile locations, and archived log information. Without a catalog, RMAN stores metadata only in the target's control file, which is lost if the control file is lost. Registering your target in a recovery catalog with `REGISTER DATABASE` protects that metadata.

Fast Recovery Area (FRA) – a disk location configured with `DB_RECOVERY_FILE_DEST` and `DB_RECOVERY_FILE_DEST_SIZE` where Oracle automatically manages backup files, archived redo logs, and flashback logs. Always confirm the FRA has sufficient space before running a backup.

Archived redo logs – copies of the online redo logs written when the database runs in ARCHIVELOG mode. Without archived logs you cannot perform media recovery. Always verify ARCHIVELOG mode is enabled before relying on RMAN for point-in-time recovery.

Backup Types: Full and Incremental

RMAN supports two primary backup types:

A common production strategy: run a level 0 on Sunday, level 1 cumulative Monday through Saturday, and back up archived logs frequently throughout the day.

Connecting RMAN and Running a Full Backup

From the OS command line, connect RMAN to the target database:

```

rman TARGET /

```

This connects using OS authentication. To connect to a recovery catalog simultaneously:

```

rman TARGET / CATALOG rman_user/password@catalog_db

```

Register the target database in the catalog once:

```

REGISTER DATABASE;

```

Run a full backup including archived logs:

```

BACKUP DATABASE PLUS ARCHIVELOG;

```

Verify the backup completed and review its contents:

```

LIST BACKUP SUMMARY;

```

Always run `CROSSCHECK BACKUP` after any backup to confirm that the backup pieces on disk match what RMAN recorded in the catalog or control file. Backups listed as EXPIRED are no longer accessible and must be addressed before you depend on them for recovery.

Incremental Backup Scripts

Level 0 (run on day 1):

```

BACKUP INCREMENTAL LEVEL 0 DATABASE;

```

Level 1 cumulative (run on subsequent days):

```

BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

```

After either run, use:

```

REPORT SCHEMA;

```

This lists all datafiles registered for the target database and is useful for confirming RMAN sees the current database structure before and after structural changes.

Simulating and Recovering from a Media Failure

A media failure occurs when a datafile becomes inaccessible — for example, when a disk fails or a file is accidentally deleted. The recovery sequence in RMAN is straightforward:

1. RMAN (or Oracle) takes the datafile offline automatically when it detects the error, or you take it offline manually using SQL: `ALTER DATABASE DATAFILE '/path/to/file.dbf' OFFLINE;`

2. Remove or rename the file at the OS level to simulate the failure.

3. In RMAN, restore the physical file from backup:

```

RESTORE DATAFILE '/path/to/file.dbf';

```

4. Apply archived redo logs to bring the file current:

```

RECOVER DATAFILE '/path/to/file.dbf';

```

5. Bring the datafile back online:

```sql

ALTER DATABASE DATAFILE '/path/to/file.dbf' ONLINE;

```

6. Open the database if it was shut: `ALTER DATABASE OPEN;`

Document every command and its output in your lab log. Recovery exercises are only valid if they are repeatable and documented.

Safety and Access Control Considerations

Database backup work does not involve physical electrical hazards, but it carries significant data safety responsibilities:

Key terms8

RMAN (Recovery Manager)Oracle's built-in command-line tool for backing up, restoring, and recovering Oracle databases; it understands Oracle's internal block structure and automates backup management.
Recovery CatalogA separate Oracle schema that stores RMAN metadata—backup history, datafile names, and archived log information—providing a more durable record than the target database's control file alone.
Incremental Level 0 BackupAn RMAN backup that copies all used data blocks and serves as the base parent for subsequent incremental level 1 backups; unlike a full backup, it qualifies as an incremental baseline.
Incremental Level 1 Cumulative BackupAn RMAN backup that copies all blocks changed since the most recent level 0 backup, regardless of any intermediate level 1 backups; simplifies recovery by reducing the number of backup sets needed.
Fast Recovery Area (FRA)A disk location configured in Oracle where RMAN automatically stores and manages backup files, archived redo logs, and flashback logs; configured with DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE.
Media FailureA condition in which one or more datafiles become inaccessible due to disk failure, accidental deletion, or corruption; RMAN's RESTORE and RECOVER commands are the standard response.
CROSSCHECK BACKUPAn RMAN command that verifies whether backup pieces and copies recorded in the catalog or control file actually exist and are accessible on disk or tape; marks missing backups as EXPIRED.
ARCHIVELOG ModeAn Oracle database operating mode in which completed online redo log groups are copied (archived) before being overwritten, enabling media recovery and point-in-time recovery.
In class: Watch and annotate an instructor-led demonstration of connecting RMAN to a target database, running BACKUP DATABASE PLUS ARCHIVELOG, and verifying the backup with LIST BACKUP SUMMARY; then reproduce the same sequence independently on a lab instance. · Write and run an RMAN incremental level 0 backup script followed the next day by a level 1 cumulative backup; use REPORT SCHEMA and CROSSCHECK BACKUP to confirm backup validity and document the output. · Simulate a datafile media failure by taking a datafile offline and removing it from the OS; use RMAN to RESTORE DATAFILE and RECOVER DATAFILE, then bring it online and open the database; record every RMAN command and its output in the lab log.
Materials: Oracle Database Express Edition (XE) or Oracle Database 19c lab instance; RMAN command-line client; Oracle Database Backup and Recovery User's Guide (docs.oracle.com); lab log template; instructor-prepared demo script
Check: Instructor evaluates lab log for correct RMAN command syntax, successful backup verification output, and demonstrated datafile restore; student must complete the restore exercise independently with a passing rubric score of 80%.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Oracle DBA CA – Backup and Recovery
1. Which RMAN command registers a target database in an existing recovery catalog?
Oracle DBA CA – Backup and Recovery
2. A DBA runs BACKUP DATABASE PLUS ARCHIVELOG in RMAN. What does the PLUS ARCHIVELOG clause add to the backup operation?
Oracle DBA CA – Backup and Recovery
3. After completing an RMAN backup, the DBA discovers that one backup piece listed in the catalog is no longer present on disk. What status will CROSSCHECK BACKUP assign to that piece?
Oracle DBA CA – Backup and Recovery
4. A DBA runs a level 0 incremental backup on Sunday. On Wednesday, they run a level 1 cumulative backup. Which blocks does Wednesday's backup contain?
Oracle DBA CA – Backup and Recovery
5. What is the correct order of RMAN steps to recover from a single missing datafile while the rest of the database remains open?
Oracle DBA CA – Backup and Recovery
6. Which RMAN command displays the names, sizes, and statuses of all datafiles currently registered for the target database?
Oracle DBA CA – Backup and Recovery
7. A full RMAN backup completes successfully, but when the DBA later attempts to use it for recovery, RMAN reports the backup set is inaccessible. Which preventive practice would most reliably detect this problem immediately after each backup?
Oracle DBA CA – Backup and Recovery
8. Why is a recovery catalog recommended over relying solely on the target database's control file for RMAN metadata?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.