Recovering Image Copies
Recover Image Copies by
using Incremental Backup
RMAN Can Recover Image Copies by using Incremental Backups.
With this Recovery method, you use RMAN to recover a copy of data file-
that is, you roll forward(recover) the image copy to the specified point in
time by applying the incremental backups to the image copy.
The Image copy is updated with all changes up through the SCN at which
incremental backup was taken.
Then, RMAN uses the resulting updated data file in media recovery just
as it would use a full image copy taken at the SCN, without the overhead of
performing a full image copy of the database everyday.
Benefits
You reduce the time required for media recovery (using archive logs)
because you need to apply archive logs only since the last incremental backup.
You do not need to perform a full image copy after the incremental
restoration.
Example:
RMAN
> recover copy of database with tag ‘daily_inc’;
RMAN>
backup incremental level 1 for recover of copy with tag ‘daily_inc’ database;
Performing a Fast Switch
to Image Copies
Steps
1. Take data file offline.
2. Use the Switch
to Copy Command to switch to image copy.
3. Recover Data Files.
4. Bring the Data files online.
Do the Following to put the files back into
their Original Location
1. Create the image copy of the data file in the
original location.
2. Take data files offline.
3.
Switch to Copy
4.
Recover
Data Files.
5.
Bring
the data files online.
Use the SET NEWNAME Command in a RUN Block to restore to a
non-default location.
RUN
{
Allocate channel c1 device type disk;
Allocate channel c2 device type sbt;
SQL “alter tablespace users offline immediate’;
Set newname for datafile ‘/disk1/oradata/prod/users01.dbf’
to ‘/disk2/users01.dbf’;
Restore tablespace users;
Switch datafile all;
Recover tablespace users;
Sql ‘alter tablespace users online’;
}
Here when the restore command executes, the users01.dbf data file is
restored to /disk2/user01.dbf. it is written there, but the control file is
still not pointing to that location. The Switch command cause the control file
to be updated with the new location.
Order of Precedence for the SET NEWNAME
command as follows
SET NEWNAME FOR DATAFILE or SET NEWNAME FOR TEMPFILE
SET NEWNAME FOR TABLESPACE
SET NEWNAME FOR DATABASE
No comments:
Post a Comment