How to recover an Oracle Database...

How to restore database to a new host from an Oracle RMAN Database backup.

# mount path to the database backup

mount -o vers=4,proto=tcp,sec=sys,hard,intr,rsize=1048576,wsize=1048576,retrans=5,timeo=600 oracle:/mnt/backup /mnt/backup

rman nocatalog
RMAN> connect target /
RMAN> set dbid 1578985198
RMAN> startup nomount;
RMAN> restore spfile from autobackup db_recovery_file_dest='/mnt/backup/oradata' db_name='DB';
RMAN> shutdown abort;

SQL> convert spfile to pfile;
SQL> startup

RMAN> restore controlfile from autobackup;
RMAN> alter database mount;
RMAN> restore database;

SQL> create spfile from pfile='/app/oracle/product/11.2.0/dbhome_1/dbs/initDB.ora';
SQL> alter system set control_files='+DATA/DB/CONTROLFILE/current.256.817465655' scope=spfile;

ln -s /mnt/backup/oradata/DB/backupset /data/oradata/DB/
ln -s /mnt/backup/oradata/DB/autobackup /data/oradata/DB/

RMAN> recover database;

Last update:
2016-04-20 12:12
Andreas Vogler
Average rating:0 (0 Votes)

You can comment this FAQ

Chuck Norris has counted to infinity. Twice.