Oracle DB Recovery

disaster recoveryoraclerecoveryrman

Before I start, I just want to mention that I am not a DBA, I am a programmer/developer who also happens to look after the database. So if I say something wrong, my apologies in advance.

We recently experienced a massive city wide power surge which killed our database server. We have multiple databases running on the server (RHEL6 – Oracle 11gr2). I back up all the data using rman and the command "backup database plus archivelog delete input" and then take an impdp dump of one particular schema so that we can import it into our test environments over night. After our server was destroyed, the only thing we could recover from the hard drives was the backupset folder which contains a lot of bkp files. And that's about it. I don't have a control file or the DBID of the database. I do however have a data dump that's 3 days old

Is there any way we can recover the database on to a new host?

Regards

Alex

Best Answer

Yes, there is. transfer the files to a new server, if you have one, using the same file structures. next create a init.ora file with the dbname and control_file parameters. Start the instance using that init.ora in nomount.

If you happen to have snapshot controlfiles in $ORACLE_HOME/dbs/ of you database, start rman:

rman target=/
restore controlfile from '/where/is/it/o1_mf_ncsnf_TAG20130803T022352_8zrqqfc4_.bkp';
alter database mount;
restore database;
recover database;
alter database open;

Without controlfile it's a little trickier but still possible. A nice explanation is here How to restore an rman backup without any existing control files

Tip: always end your backup by creating a copy of your current controlfile:

BACKUP AS COPY CURRENT CONTROLFILE FORMAT '/tmp/controlfile_%Y%M%D.ctl';

Preferably on a smarter location than /tmp. Not only does it contain your database layout, also the administration of your most recent and most valuable backup.