Skip to content

Instantly share code, notes, and snippets.

@deshneni-akhil
Created April 25, 2025 18:35
Show Gist options
  • Select an option

  • Save deshneni-akhil/87512fc4e0c37f86b93519a3bff77114 to your computer and use it in GitHub Desktop.

Select an option

Save deshneni-akhil/87512fc4e0c37f86b93519a3bff77114 to your computer and use it in GitHub Desktop.
Instructions to restore the database using RMAN backup files

Oracle Database Restoration Procedure Using RMAN

Overview

This document outlines the step-by-step procedure to restore an Oracle Database using RMAN backups. Restoration is performed on a fresh development environment.

Preconditions

  • RMAN backup files must be transferred from the production backup location (F:\rman_backup) to a similar dedicated directory on the development server (F:\rman_backup).
  • Database software must be installed and configured on the development server.

Restoration Steps

Step 1: Start RMAN

Open RMAN and connect to the development database instance:

rman target /

Step 2: Start Database in NOMOUNT Mode

Start the instance without mounting the database:

STARTUP NOMOUNT;

Step 3: Restore Control File

Restore the control file from the backup:

RESTORE CONTROLFILE FROM 'F:\rman_backup\backup_controlfile.bkp';

Replace 'backup_controlfile.bkp' with the exact filename of the control file backup.

Step 4: Mount the Database

Mount the database using the restored control file:

ALTER DATABASE MOUNT;

Step 5: Catalog Backup Files

Register backup files with RMAN:

CATALOG START WITH 'F:\rman_backup\';

This step ensures RMAN recognizes the backup files in their current location.

Step 6: Restore Database

Restore database files from the backup:

RESTORE DATABASE;

Step 7: Recover Database

Perform database recovery to apply archived logs:

RECOVER DATABASE;

Step 8: Open Database

Finally, open the database with reset logs:

ALTER DATABASE OPEN RESETLOGS;

Post-Restoration Verification

Perform the following checks to verify restoration success:

  • Confirm database status and integrity.
  • Validate object and row counts for consistency with the production database.
  • Run sample queries to cross-check data accuracy.

Example verification command:

SELECT COUNT(*) FROM [important_table];

Handling Restoration Issues

In case of import or recursive dependency issues, use the following data pump import options:

impdp system/password DIRECTORY=dp_dir DUMPFILE=full.dmp LOGFILE=import.log FULL=Y DATA_OPTIONS=SKIP_FAILED_OBJECTS

This allows the restoration process to proceed smoothly, skipping problematic objects and logging errors for further inspection.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment