How to move or add a controlfile when ASM is involved

Hi folx,

sometimes, you may want to add or move a controlfile. On OS file system, this is no problem. Just “shutdown immediate”, change the CONTROL_FILES init parameter, copy or move the controlfile, and startup again.

With ASM involved this is not possible, since the ASM does not allow direct move or copy commands. You need the recovery manager RMAN for this. Easiest way is, use Oracle Managed Files (OMF) for all your files.

Please read the whole post before taking any action. You do everything posted here at your own risk, I am not responsible for damage to your database, your data or your machine at all.

My example tells how to move a controlfile from one disk to another, while another controlfile keeps untouched. Preface: control_files parameter has been

'+UNINVOLVED/SID/CONTROLFILE/current.256.1234567890',
'+OLDDG/SID/CONTROLFILE/current.277.1234567890'

before.

SQL>
 shutdown immediate;
 startup nomount;
 alter system set
 control_files=
 '+UNINVOLVED/SID/CONTROLFILE/current.256.1234567890',
 '+TARGETDISKGROUP' scope=spfile sid='*';
 shutdown immediate;
 startup nomount;

Now, the changed parameter is activated. If you want to ADD a controlfile, just imagine the control_files option line with more UNINVOLVED diskgroups.

shell>
 rman target /
RMAN>
 restore controlfile from
 '+OLDDG/SID/CONTROLFILE/current.277.1234567890';

You may specify all current controlfiles for this action! So for my example ‘+UNINVOLVED/SID/CONTROLFILE/current.256.1234567890’ is possible, too. It’s a cool way to recreate a corrupted controlfile if you still have a good one. Make sure it is REALLY good, because you will overwrite all files named in CONTROL_FILES!

RMAN tells you the input and output file after doing the operation. Check it carefully! If it does not look like expected, consider changing DB_CREATE_FILE_DEST temporarily.

After running the rman recover command, have a look at the control_files parameter: You will find it changed to the OMF name of your copy.

Now mount the instance, check / correct any parameters you may need, and open the instance happily with a new controlfile.

Be careful,
Usn




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply