Time-based
recovery allows the DBA to recover to a desired point of time. This situation
is most likely to occur if archive logfiles or redo logfiles needed for
recovery are lost or damaged and cannot be restored. In this situation you
would apply all logs until a point in time specified by the UNTIL TIME clause
of the RECOVER command.
C:\RMAN TARGET /
Oracle
will automatically stop recovery when the time specified in the RECOVER command
has been reached. Oracle will respond with a recovery successful message.
Steps:
- If the
database is still open, shut down the database using the SHUTDOWN command with
the ABORT option.
- Make a full backup of the database including all datafiles, a control file, and the parameter files in case an error is made during the recovery.
- Restore backups of all datafiles. Make sure the backups were taken before the point in time you are going to recover to. Any datafiles added after the point in time you are recovering to should not be restored. They will not be used in the recovery and will have to be recreated after recovery is complete. Any data in the datafiles created after the point of recovery will be lost.
- Make a full backup of the database including all datafiles, a control file, and the parameter files in case an error is made during the recovery.
- Restore backups of all datafiles. Make sure the backups were taken before the point in time you are going to recover to. Any datafiles added after the point in time you are recovering to should not be restored. They will not be used in the recovery and will have to be recreated after recovery is complete. Any data in the datafiles created after the point of recovery will be lost.
Make sure
read-only tablespace are offline before you start recovery so recovery does not
try to update the datafile headers.
- Make sure all the datafiles in the database are online. You can check the status of datafiles by querying the V$DATAFILE view.
Now Connect the rman with target database and run the following command:- Make sure all the datafiles in the database are online. You can check the status of datafiles by querying the V$DATAFILE view.
C:\RMAN TARGET /
RMAN> shutdown Abort;
RMAN> startup mount;
RMAN> sql "alter session set nls_date_format=''dd-mon-yyyy hh24:mi:ss''";
RMAN> set until time '15-Mar-2012 14:11:00';
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;
No comments:
Post a Comment