Tuesday, May 13, 2014

Restore Control file using RMAN Backuppiece



 rman target "/"

Recovery Manager: Release 11.2.0.4.0 - Production on Tue May 13 06:43:07 2014

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

connected to target database (not started)

RMAN> startup

Oracle instance started
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 05/13/2014 06:43:28
ORA-00205: error in identifying control file, check alert log for more info


Steps to restore controlfile from backuppiece

1. shutdown the database in abort mode

RMAN> shutdown abort

using target database control file instead of recovery catalog
Oracle instance shut down

2. Startup the database in nomount mode

 rman target "/"

Recovery Manager: Release 11.2.0.4.0 - Production on Tue May 13 06:51:04 2014

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

connected to target database (not started)

RMAN> startup nomount

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

3.Restore controlfile from backuppiece 

RMAN> restore controlfile from "+DATA/cvrman/backupset/2014_05_13/ncnnf0_tag20140513t062429_0.295.847434271";

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

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:05
output file name=+DATA/cvrman/controlfile/current.261.847436149
output file name=+DATA/cvrman/controlfile/current.260.847436151
Finished restore at 13-MAY-14

4.Alter database to mount mode

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

5. Recover the database
RMAN> recover database;

Starting recover at 13-MAY-14
Starting implicit crosscheck backup at 13-MAY-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK
Crosschecked 10 objects
Finished implicit crosscheck backup at 13-MAY-14

Starting implicit crosscheck copy at 13-MAY-14
using channel ORA_DISK_1
Crosschecked 8 objects
Finished implicit crosscheck copy at 13-MAY-14

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

List of Cataloged Files
=======================
File Name: +data/CVRMAN/BACKUPSET/2014_05_13/ncnnf0_TAG20140513T062429_0.295.847434271

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 12 is already on disk as file +DATA/cvrman/onlinelog/group_3.266.847355299
archived log file name=+DATA/cvrman/onlinelog/group_3.266.847355299 thread=1 sequence=12
media recovery complete, elapsed time: 00:00:00
Finished recover at 13-MAY-14


6. Open the database in resetlogs mode
RMAN> alter database open resetlogs;
database opened



No comments: