Wednesday, October 19, 2011

RESTORE CONTROLFILE FROM AUTOBACKUP ON MODE (WITH OUT RECOVERY CATALOG )

I have lost my spfile and controlfile which are stored in the ASM disk and now I am trying to restore the spfile & controlfile from the autobackup and it is not enabled with the recovery catalog. This article covers only the controlfile restore and i have updated another article with SPFILE restore.

Note: This is for the RAC database and I am started with one instance till I complete the entire process, i am not going to do anything on the second instance. I am doing the autobackup to the TAPE.

Note: when you are allocating the channel & no of channels, you have specified
      Accordingly to system perform. It can be either from disk & tape. In the  below example  i have used TAPE. so i have used the below option.
RESTORING CONTROLFILE (WITH OUT RECOVERY CATALOG & AUTOBACKUP ON MODE)

bhuora01[BHU_1]>rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Thu Oct 6 17:26:15 2011

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

connected to target database: BHU (not mounted)

RMAN> set DBID 1726821198;

executing command: SET DBID

RMAN> run
{
allocate channel 'dev_0' type 'sbt_tape'
parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=BHU_A,OB2BARLIST= bhuora01_ORA_BHU_ON_Weekly)';
restore controlfile from autobackup;
}
2> 3> 4> 5> 6>
using target database control file instead of recovery catalog
allocated channel: dev_0
channel dev_0: SID=67 instance=BHU_1 device type=SBT_TAPE
channel dev_0: Data Protector A.06.11/PHSS_41802/PHSS_41803/DPSOL_00435/DPLNX_

Starting restore at 06-OCT-11

channel dev_0: looking for AUTOBACKUP on day: 20111006
channel dev_0: AUTOBACKUP found: c-1726821198-20111006-00
channel dev_0: restoring control file from AUTOBACKUP c-1726821198-20111006-00
channel dev_0: control file restore from AUTOBACKUP complete
output file name=+BHU_DATA1/BHU_a/controlfile/current.271.763839227
output file name=+BHU_ARCH/BHU_a/controlfile/current.369.763839227
output file name=+BHU_RECO/BHU_a/controlfile/current.281.763839227
Finished restore at 06-OCT-11
released channel: dev_0

RMAN>

Note: Here the controlfile locations are picked up from the SPFILE.

Once you restore the control file, you have to check the control_files values and if it different in the ASM DISKGROUP then you have to modify the control_files values in the spfile. You have to issue a alter system command to update for entire instances with sid='*' and start the RAC database.

No comments:

Post a Comment