jeudi 17 novembre 2011

Oracle 11g: Restore points


A restore point gives a name to a point in time.

You can create a restore point at the current time :
SQL> CREATE RESTORE POINT <name_of__restore_point>;
or create a point in the past :
SQL> CREATE RESTORE POINT <name_of__restore_point> AS OF SCN #;

The restore point is stored in the control file within the period of retention defined by the CONTROL_FILE_RECORD_KEEP_TIME parameter.
If you want the restore point never expires add the PRESERVE key word at the previous commands.
SQL> CREATE RESTORE POINT <name_of__restore_point> PRESERVE;

You can see all restore points created through the database view V$RESTORE_POINT or use RMAN:
RMAN> LIST RESTORE POINT ALL;

You can delete a restore point using:
SQL> DROP RESTORE POINT <name_of__restore_point>;