Recovering_control_files

6.7 Recovering Control Files
6.7.1 Verifiy your backup control file
RMAN> list backup of controlfile;

6.7.2 Recovering Control File using FRA

RMAN> startup force nomount
RMAN> restore controlfile from autobackup;
RMAN> alter database mount
RMAN> recover database
RMAN> alter database open resetlogs;

6.7.3  Recovering  Control Files without using FRA
6.7.3.1 Disable FRA and configure Filesystem backup
SQL> show parameter db_recovery_file_dest
SQL> alter system set db_recovery_file_dest=” scope=spfile;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP on;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/zpool_tmp/DB_BACKUP/autobackup_%F’;
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT ‘/zpool_tmp/DB_BACKUP/backup_%F’;
RMAN> backup database  plus archivelog delete input;
Filesystem  Backup looks like:
Feb 22 15:44 autobackup_c-3523769914-20130222-00
Feb 22 15:43 ora_df808069403_s6_s1
Feb 22 15:43 ora_df808069409_s7_s1
Feb 22 15:43 ora_df808069434_s8_s1

6.7.3.2 Recovering without using FRA
SQL> select dbid from v$database;
DBID
———-
3523769914
RMAN> startup force nomount
RMAN> set dbid 3523769914
RMAN> set CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/zpool_tmp/DB_BACKUP/autobackup_%F’;
RMAN> restore controlfile from autobackup;
RMAN> alter database mount;
RMAN> recover database;
RMAN> alter database open resetlogs;

Full output from used Recovery commands !

6.7.4.1 Disabled FRA and AUTOBACKUP OFF
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP OFF;
RMAN> backup database  plus archivelog delete input;
Filesystem  Backup looks like:

6.7.4.2 Recovering Control Files  with catalog and AUTOBACKUP OFF
%  rman target=sys/sys@DB2DUP catalog=rman/rman@rman
connected to target database: DB2DUP (DBID=3523769914)
connected to recovery catalog database
RMAN> startup force nomount
RMAN> restore controlfile;
RMAN> alter database mount;
RMAN> recover database;
RMAN> alter database open resetlogs;

Full output from used Recovery commands !

6.7.5 Lessons learned in this session

  • to skip newer controfiles use
    RMAN> restore controlfile from autobackup from maxseq=2;
    RMAN> restore controlfile from autobackup maxdays 2;
  • if you get ORA-19803: Parameter DB_RECOVERY_FILE_DEST_SIZE  is out of range (1  …
    when running :  SQL>  alter system set db_recovery_file_dest_size=0;
    SQL> create pfile from spfile
    –> remove DB_RECOVERY_FILE_DEST_SIZE entry from pfile
    SQL> create spfile from pfile
  • Only NON-OMF backups can use %F from the AUTOBACKUP FORMAT clause
    By default, the format of the autobackup file for all configured devices is the substitution variable
    %F in the FORMAT clause. This variable format translates into c-IIIIIIIIII-YYYYMMDD-QQ, with the
    placeholders defined as follows:
    IIIIIIIIII stands for the DBID.
    YYYYMMDD is a time stamp of the day the backup is generated.
    QQ is the hex sequence for backup done  that starts with 00 and has a maximum of FF.
    Example OMF autobackup controlfile: o1_mf_s_716574721_5wn6p1hj_.bkp
    Example of NON-OMF file: autobackup_c-3523769914-20130222-00
  • If not using AUTOBACKUP ON you need to have a valid recovery calalog to know about your controlfile location

Leave a Reply

Your email address will not be published. Required fields are marked *