Restore and Recovery of a NOARCHIVELOG database using RMAN
When performing a consistent backup (also known as cold or offline backup) with Recovery Manager, it will backup the datafiles and generate a backup controlfile, the online redo logs are never backed up by RMAN.
Hence, after a full database restore, the database has to be opened with RESETLOGS, because online redo logs are not available. The OPEN RESETLOGS command will create the online redo logs based on information from the database’s controlfile.
This would be the scenario :
1. both controlfile and datafiles are checkpointed at the same SCN, and
2. this controlfile is a backup controlfile
These conditions are true for a consistent, full backup of a NOARCHIVELOG database using RMAN. So, a more practical and convenient way to restore and recover a consistent, full backup of a NOARCHIVELOG database is to OPEN RESETLOGS the database just after the restore of the datafiles and the backup controlfile:
In RMAN:
run { allocate channel c1 type disk; restore controlfile to '[pathname]'; replicate controlfile from '[pathname]'; sql "alter database mount"; restore database; sql 'alter database open resetlogs'; release channel c1; }
RMAN> reset database;
This mechanism also works well without RMAN. If you have a consistent backup of datafiles having used OS utilities (like cp, tar, dd, etc.), as well as a backup controlfile having executed an ALTER DATABASE BACKUP CONTROLFILE TO ‘file’ command, you can proceed as followed:
– Restore datafiles and backup controlfile
– In SQLPLUS:
sql> startup mount sql> alter database open resetlogs