Monday, June 10, 2013

RMAN Recovery Scenarios

Restoring Control file:
     | 1. Using FRA

When "Autobackup ON" enabled:
RMAN> connect target /
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;

     Control file location when Autobackup Enabled:
     \<FRA>\<target database SID>\autobackup\YYYY_MM_DD\<backup piece file>


When "Autobackup OFF" enabled:
RMAN> connect target /
RMAN> startup nomount;
RMAN> restore controlfile from
2> 'C:\FRA\DB1\backupset\2006_09_23\01_mf_ncnnf_TAG20060923T02kc1vgsh.bck';

     Control file location when Autobackup is NOT Enabled:
    \<FRA>\<target database SID>\backupset\YYYY_MM_DD\<backup piece file>


     | 2. Using RC

RMAN> connect target /
RMAN> connect catalog rcat/rcat@recov
RMAN> startup nomount;
RMAN> list backup of controlfile;   ------------------------> To  view the list of control files

RMAN> restore controlfile;

--------------------------------------------------------------------------------------------------------------

Using Autobackup, with RMAN Backup Piece in the Default Location:
RMAN> set dbid 2601506593;
RMAN> restore controlfile from autobackup;

Using Autobackup, with RMAN Backup Piece in a Nondefault Location:
RMAN> set dbid 2601506594;
RMAN> set controlfile autobackup format for device type disk to 'C:\ODUMP\%F';
RMAN> restore controlfile from autobackup;

Not Using Autobackup, with RMAN Backup Piece in the Default Location
RMAN> restore controlfile from '/ora01/app/oracle/product/10.2.0/dbs/1hhu0gn1_1_1';

Not Using Autobackup, with RMAN Backup Piece in Nondefault Location
RMAN> configure channel device type disk format '/orabackups/%d%U.bus';

RMAN> restore controlfile from '/orabackups/BRDSTN1lhu0oi_1_1.bus';

----------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

Oracle row type vs PostgreSQL record

The Oracle row type concept can be accomplished with the record type in PostgreSQL. Example: Oracle: CURSOR travel_cur IS  SELECT  c.travel_...