You have a current control file and SPFILE but all datafiles are damaged or lost. You must restore and recover the whole database.
The database has one read-only tablespace, history, which must be restored from backup but which does not need media recovery.
The procedures will restore the whole database to their original locations.
- A Closed or open valid DB backup needed for media recovery.
- You must have the complete set of archived logs.
- The current control file is available.
- The database is mounted and should not be open.
- With a complete set of online and archived redo logs, RMAN can re-create a datafile for which there is no backup, by creating an empty datafile and then re-applying all changes since the file was created.
- After recovery of a whole database, when the database is opened, any missing temporary tablespaces recorded in the control file are re-created with their previous creation size, AUTOEXTEND and MAXSIZE attributes.
- Only temporary tablespaces that are missing are re-created. If a tempfile is still present at the location recorded in the RMAN repository but has an invalid header, then RMAN does not re-create the file.
RMAN> STARTUP MOUNT
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
#Examine the output to see if recovery was successful.
RMAN> SQL ‘ALTER DATABASE OPEN’;
#--[Option-1]-- if DB contail Read-Only Tablespace:
# The read-only tablespace does not need media recovery only restore from
# backup is sufficient By default, the restore operation will skip
# read-only tablespaces.
#To Force RMAN to restore any missing datafiles belonging to read-only
# tablespaces. Replace step-2 with following command
RMAN> RESTORE DATABASE CHECK READONLY;
#--[Option-2:]-- Delete archivelog restored during media recovery. Replace
# step-2 with following command:
RMAN> RECOVER DATABASE DELETE ARCHIVELOG;