1. You cannot perform Incomplete recovery operations on only a part of the database, because this gives a part of the database a different system change number (SCN) or time point from the rest of the database.
2. Use the set command in the run code block and the until time, until SCN, or until sequence parameter to create a recovery target.
Run
{
Set until time "to_date ('2017/06 15:00:00 ', 'Mm/dd/yy hh24: mi: ss ')";
Restore database;
Recover database;
Alter database open resetlogs;
}
The preceding method can also be used to directly use the until time, until SCN, or until sequence parameters in the restore and recover commands, in this way, avoid using the run code block (this is a more Recommended Practice). See the next code section.
3. Time Point-based recovery
Startup mount;
Restore database until time "to_date ('2017/06 15:00:00 ', 'Mm/dd/yy hh24: mi: ss ')";
Recover database until time "to_date ('2017/06 15:00:00 ', 'Mm/dd/yy hh24: mi: ss ')";
Alter database open resetlogs;
4. SCN-based recovery
The following code restores the database to SCN 10000, but does not contain this SCN.
Startup mount;
Restore database until scn 10000;
Recover database until scn 10000;
Alter database open resetlogs;
5. Log sequence-based recovery
The following code restores the database to a log sequence of 100, but does not contain this log sequence.
Startup mount;
Restore database until sequence 100 thread 1;
Recover database until sequence 100 thread 1;
Alter database open resetlogs;
6. Restore with Restore Point
Restore database until restore point TANGO_ONE;
Recover database until restore point TABGO_ONE;
Alter database open resetlogs;
The following describes how to use the run code block and the set command to create a target Restore Point.
Run
{
Set restore point TANGO_ONE;
Restore database TANGO_ONE;
Recover database TANGO_ONE;
}
Alter database open resetlogs;
Recommended reading:
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption