Database Reference
In-Depth Information
specific incremental backups that you want to use for a restore. When you use tags, Oracle
will still do a complete recovery unless you use the UNTIL TIME parameter to indicate that you
want to recover to a specific point in time.
Here is an example where we are restoring the database using the tag gold_copy :
shutdown immediate
startup mount
restore database from tag 'gold_copy';
recover database from tag 'gold_copy';
alter database open;
We discussed database incarnations in Chapter 2. Sometimes for specific
types of RMAN recoveries you will need to reset the database incarnation.
We will cover this in more detail in Chapter 7.
Using Image Copies to Recover
Your Database
Recall that an image copy is an exact copy of a given database data file. You can use image
copies to restore your database. This can provide for quick database recovery, though the
image copies will require much more storage than a compressed backup set piece.
Oracle provides the SWITCH command to use in place of the RESTORE command. This
will essentially change the control file so it will point to the data file copy(ies). You
then would call the RECOVER command to apply any incremental backups and archived
redo logs to restore the data file(s) or tablespace(s). You can switch the entire database,
tablespaces, or specific data files depending on your needs. Here is an example where we
are restoring data file 4:
Sql 'alter database datafile 4 offline';
Switch datafile 4 to copy '/oracle/backup/users_01.dbf';
Recover datafile 4;
Sql 'alter database datafile 4 online';
Note that if you are making image copies and backup-set copies, RMAN will deter-
mine which to use during a normal restore operation. This includes image copies that are
updated with incremental backups (discussed in Chapter 3). So, with image copies you
really have two options for restore and recovery:
RESTORE command Use the RESTORE command to have RMAN copy the image copies to
the original location of the database data files. This will not result in any changes to data
file locations in the database control file.
Search WWH ::




Custom Search