Oracle RMAN DB disaster recovery procedure and prerequisites
Hello EMC,
I created one vm named as oratest to test and perform the oracle db backup & restore using Networker NMDA. To test the backup and recovery I created the database and performed the backups successfully. After completing the backup successfully I delete the oracle DB. Now I want to rebuilt the db from the backups.
I tried to perform the restore from networker recovery wizard but recovery got failed. Please find the below for error logs. Unfortunately there is a limited information in the NMDA administration guide.
Now I'm looking for the necessary procedures and perquisites to perform the recovery successfully for the above scenario.
Below are the details of the networker configuration.
Networker Server: 9.0.1 buid 636 ( Installed on Windows Server 2012 R2)
That "creating datafile file number=1" line right before the error is the clue. RMAN isn't restoring datafile 1 from your backup; it's trying to create a brand new one, and Oracle can't create a SYSTEM datafile from scratch (ORA-01180). That usually means the control file you restored against doesn't contain any record of your backups. With no recovery catalog, the control file is the only place RMAN looks.
The usual fix is to rebuild in the right order, starting with the control file:
Recreate the directory paths and set ORACLE_SID and ORACLE_HOME the same as the original server. Have a minimal init file ready (db_name=rest is enough to start).
In RMAN: connect to the target, then run SET DBID 2680244252; and STARTUP NOMOUNT;
Allocate your SBT channel with the same NSR_SERVER and NSR_CLIENT parameters you used for the backup.
Optional: RESTORE SPFILE FROM AUTOBACKUP; then restart in NOMOUNT.
RESTORE CONTROLFILE FROM AUTOBACKUP; then ALTER DATABASE MOUNT;
RESTORE DATABASE; then RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
This depends on CONFIGURE CONTROLFILE AUTOBACKUP having been ON when you took the backups. If it wasn't, you'd need the exact control file backup piece name from the NetWorker index and use RESTORE CONTROLFILE FROM 'piece name'.
Common Mistakes with This Scenario:
Not saving the DBID before deleting the database.
Starting from the old control file or a freshly created one instead of restoring the backed-up one.
Missing directories, so datafile paths can't be created.
Different NSR_CLIENT or server settings than the backup used.
Forgetting OPEN RESETLOGS after incomplete recovery.
Never testing a full rebuild until it's an emergency.
If you're ever left with datafiles that survived but are corrupt, and no backup can be restored, the Kernel Oracle Database Recovery tool can repair corrupt DBF files and recover tables, views, tablespaces, and deleted records, with a free trial that repairs and previews first. It won't help if the files are completely gone, so tested backups come first.
If you post the output of LIST BACKUP SUMMARY and SHOW ALL, it will be easier to see what RMAN can actually find.
Kleinenbroich
86 Posts
3247
0
Posted February 1st, 2017 05:00
Hi,
I'm not really an Oracle expert, but can you try the following:
1.) Configure the channels:
rman target /
CONFIGURE CHANNEL 1 DEVICE TYPE ‘SBT_TAPE’ PARMS ‘ENV=(NSR_SERVER=darnetworker.alarkan.com, NSR_CLIENT=oratest, NSR_DATA_VOLUME_POOL=name_of_the_used_pool)’;
CONFIGURE CHANNEL 2 DEVICE TYPE ‘SBT_TAPE’ PARMS ‘ENV=(NSR_SERVER=darnetworker.alarkan.com, NSR_CLIENT=oratest, NSR_DATA_VOLUME_POOL=name_of_the_used_pool)’;
2.) The full Oracle database recovery is an offline recovery, Oracle must run in the so called “mount” mode: The database is mounted but not started:
sqlplus / as sysdba
startup mount;
3.) Start the recovery:
rman target /
RESTORE DATABASE;
RECOVER DATABASE;
alter database open resetlogs;