Saturday, May 17, 2014

Restore Controlfile from autobackup


1.It is possible to restore controlfile from autoback,only if the db_recovery_file_dest and the controlfile autobackup is set

RMAN> startup

connected to target database (not started)
Oracle instance started
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 05/17/2014 03:09:45
ORA-00205: error in identifying control file, check alert log for more info

2.Shutdown the database in abort mode.

RMAN> shutdown abort;

Oracle instance shut down


3. RMAN command file for restore and recover the database after failed controlfile
$ cat rman_18.cmd
run
{
startup nomount;
restore controlfile from autobackup;
startup mount force;
recover database;
alter database open  resetlogs;
}

4.Call the command file from the rman command prompt.

$ rman target="/" @rman_18.cmd | tee rman_18.log

Recovery Manager: Release 11.2.0.4.0 - Production on Sat May 17 03:34:12 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> run
2> {
3> startup nomount;
4> restore controlfile from autobackup;
5> startup mount force;
6> recover database;
7> alter database open  resetlogs;
8> }
9>
Oracle instance started

Total System Global Area     730714112 bytes

Fixed Size                     2256832 bytes
Variable Size                452984896 bytes
Database Buffers             272629760 bytes
Redo Buffers                   2842624 bytes

Starting restore at 17-MAY-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 device type=DISK

recovery area destination: +DATA
database name (or database unique name) used for search: CVRMAN
channel ORA_DISK_1: AUTOBACKUP +data/CVRMAN/AUTOBACKUP/2014_05_16/s_847715018.261.847715019 found in the recovery area
AUTOBACKUP search with format "%F" not attempted because DBID was not set
channel ORA_DISK_1: restoring control file from AUTOBACKUP +data/CVRMAN/AUTOBACKUP/2014_05_16/s_847715018.261.847715019
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=+DATA/cvrman/controlfile/current.307.847769673
output file name=+DATA/cvrman/controlfile/current.275.847769673
Finished restore at 17-MAY-14

Oracle instance started
database mounted

Total System Global Area     730714112 bytes

Fixed Size                     2256832 bytes
Variable Size                452984896 bytes
Database Buffers             272629760 bytes
Redo Buffers                   2842624 bytes

Starting recover at 17-MAY-14
Starting implicit crosscheck backup at 17-MAY-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=27 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=28 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=29 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=30 device type=DISK
Crosschecked 20 objects
Crosschecked 2 objects
Finished implicit crosscheck backup at 17-MAY-14

Starting implicit crosscheck copy at 17-MAY-14
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
Finished implicit crosscheck copy at 17-MAY-14

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +data/CVRMAN/AUTOBACKUP/2014_05_16/s_847715018.261.847715019
File Name: +data/CVRMAN/ARCHIVELOG/2014_05_16/thread_1_seq_14.310.847715049
File Name: +data/CVRMAN/ARCHIVELOG/2014_05_16/thread_1_seq_15.314.847753253
File Name: +data/CVRMAN/BACKUPSET/2014_05_16/nnndf0_TAG20140516T064900_0.321.847694943

using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
datafile 5 not processed because file is read-only

starting media recovery

archived log for thread 1 with sequence 15 is already on disk as file +DATA/cvrman/archivelog/2014_05_16/thread_1_seq_15.314.847753253
archived log for thread 1 with sequence 16 is already on disk as file +DATA/cvrman/onlinelog/group_1.262.847355287
archived log file name=+DATA/cvrman/archivelog/2014_05_16/thread_1_seq_15.314.847753253 thread=1 sequence=15
archived log file name=+DATA/cvrman/onlinelog/group_1.262.847355287 thread=1 sequence=16
media recovery complete, elapsed time: 00:00:03
Finished recover at 17-MAY-14

database opened

Recovery Manager complete.

No comments: