Duplicate Controlfile To FRA (ASM)..Or..’Make It A Double!’

In a previous post we restored a database which was accidentally (a-hum) dropped from a Netbackup. In this procedure we focused on the restore, but this left us with a database running on only one control file. This is so called: not-best-practice, and since I was the one leaving the reader (yes, that would be you) with a potential dangerous situation, this post is created to remedy this.

Log into the database as sys and check the current status of the control file:

SQL> select name from v$controlfile;



Yep. It’s for real…we are running on just one controlfile. Not good. Time to fix.

Note: Make sure you are running with a spfile. If not, start from a running instance and create one from memory and bounce and start from the spfile.


SQL> alter system set control_files='+DATADG/dummydb01/controlfile/current.309.901542237','+FRADG' scope=spfile;

SQL> shutdown immediate;

SQL> startup nomount;

This is needed since we defined a location (FRA) where no controlfile is yet to be found. Hence the database will not start.

Now connect RMAN to the database:

$ rlwrap rman target /

Recovery Manager: Release - Production on Tue Jan 19 14:07:56 2016

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

connected to target database: DUMMYDB01 (not mounted)

RMAN> restore controlfile from '+DATADG/dummydb01/controlfile/current.309.901542237';

Starting restore at 19-JAN-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=926 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+DATADG/dummydb01/controlfile/current.309.901542237
output file name=+FRADG/dummydb01/controlfile/current.1590.901548509
Finished restore at 19-JAN-16

Exit RMAN, and connect with SQL (as sys):

SQL> alter system set control_files='+DATADG/dummydb01/controlfile/current.309.901542237','+FRADG/dummydb01/controlfile/current.1590.901548509';

SQL> shutdown immediate;

SQL> startup;

SQL> startup
ORACLE instance started.
Total System Global Area 1.0689E+10 bytes
Fixed Size                  2262656 bytes
Variable Size            3690989952 bytes
Database Buffers         6979321856 bytes
Redo Buffers               16900096 bytes
Database mounted.
Database opened.

Double check (since the startup confirms it already) the control_files:

SQL> select name from v$controlfile;



And this is one of the ways of doing this.



About GemsOfProgramming

Beeing a previously enthusiastic Java programmer, I rolled into the Oracle Database Administration world. It turned out I got a knack for this, and since approx. 2000 I'm a full time DBA. My experiences touches lot of Oracle products like Forms and Reports 9/10, JDAPI, Application Server, Weblogic Fusion and of course: Oracle Enterprise Databases, JavaFX, Swing and other Java components.
This entry was posted in Databases, Technical Stuff and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s