oracle11grman

Restore Backup with RMAN Oracle11g


after a crash of my database, i try to restore my backupset. 1. Create a new Database with the same name as the old database 2. Set the flash_recovery_area to the folder where the backupset from the old database is stored 3. rman -> connect target / -> restore database;

RMAN says: no data found.

How can i say the db where the backupset is stored?

Thank you!


Solution

  • Assuming you have at least one good copy of controlfile (or controlfile autobackup), you know DB_NAME, you know your DBID

    1) install exact the same Oracle DB version (only binaries)
    2) in $ORACLE_HOME/dbs create "initSID.ora" file with just 1 line DB_NAME=YouDbName (on Linux)
    3) SQL> startup nomount
    4) 
    RMAN> run{
    RMAN> set DBID 104183017;
    RMAN> SET CONTROLFILE AUTOBACKUP FORMAT  FOR DEVICE TYPE DISK TO '/u01/app/oracle/product/12.1.0.2/dbhome_1/dbs/%F';
    RMAN> restore controlfile from autobackup;
    RMAN> }
    
    5)     SQL> alter database mount;
    
    6)     RMAN> restore database;
    7)     RMAN> recover database;
    8)     SQL> alter database open resetlogs;
    

    In case you have a controlfile backup you do not need to CATALOG otherwise you need it.