Wednesday, December 30, 2015

Performing Cancel-Based Recovery

A cancel-based recovery is a type of user-managed incomplete recovery that is performed by specifying the UNTIL CANCEL clause with the RECOVER command. The UNTIL CANCEL clause specifies that the recovery process will continue until the user manually cancels the recovery process issuing the CANCEL command. This type of recovery is used when the DBA manually wants to look at the logfile name and location and then decide to apply it.

·         Recovery Steps:

1.       Connect to Rman and mount database:
RMAN> connect target /
RMAN> startup mount;

2.       Restore database:
RMAN> restore database;

3.       Connect to sql plus and doing cancel base recovery:
SQL> connect / as sysdba
SQL> recover database until cancel;
When you run above command you’ll give prompt for manually apply each archivelog files:
Specify log: [<RET> for suggested | AUTO | FROM logsource | CANCEL ]

SQL>SELECT NAME FROM V$ARCHIVED_LOG;
 
NAME
-------------------------------
/oracle/arc_dest/arcr_1_667.arc
/oracle/arc_dest/arcr_1_668.arc
/oracle/arc_dest/arcr_1_669.arc

4.       And at the end:
SQL> alter database open resetlogs;

If you are using a backup control file with this incomplete recovery, then specify the USING BACKUP CONTROLFILE option in the RECOVER command.

RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE


No comments:

Post a Comment