In this case study, (running in no-archivelog mode), any user error or media failure would require a complete database recovery. You can, however, use the SET UNTIL command, to recover to different points in time when incrementals were taken. (Keep in mind that in our example, we did not make use of incremental backups!)
NOTE: Because redo logs are not archived, only full and incremental backups (if you were taking incremental backups) are available for restore and recovery. It is assumed that you have all the configuration files like:
- Server parameter file (spfile - equivalent of init.ora in 9i)
- tnsnames.ora
- listener.ora
- sqlnet.ora (optional)
- If not using a recovery catalog, or if the database name is ambiguous in, you need to start RMAN and set the DBID before restoring the controlfile from autobackup.
- Startup database in NOMOUNT mode. (You should have restored the initialization file for database, and listener files [only if connecting over SQLNET].)
- Restore controlfile.
- Mount the database.
- Restore all database files. (Use CHECK READONLY, to make sure all read-only files are correct. If not RMAN will not restore them!)
- Apply all incrementals. (In this example, we are not taking incremental backups, so this step is not required.)
- Open database with RESETLOGS mode to re-create the online log files.
- You will need to manually add any tempfiles back to the database after recovering the database.
Script: recover_cold.rcv set dbid 2528050866;
connect target backup_admin/backup_admin;
startup nomount;
run {
# -----------------------------------------------------------
# Uncomment the SET UNTIL command to restore database to the
# incremental backup taken two days ago.
# SET UNTIL TIME 'SYSDATE-2';
# -----------------------------------------------------------
set controlfile autobackup format for device type disk to '/orabackup1/rman/TARGDB/%F';
restore controlfile from autobackup;
alter database mount;
restore database check readonly;
recover database noredo;
alter database open resetlogs;
sql "alter tablespace temp add tempfile ''/u06/app/oradata/TARGDB/temp01.dbf''
size 500m autoextend on next 500m maxsize 1500m";
}
exit
NOTE: Tempfiles are automatically excluded from RMAN backups. This requires them to be re-added at recovery time. There is an enhancement, 1641989, requesting RMAN take care of these tempfiles in the future.
Monday, June 2, 2008
Restoring and Recovering the Target Database
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment