Pages

Monday, January 11, 2010

Add a controlfile into ASM when original controlfile is stored on ASM

Some days ago I installed Oracle 11gR2 on a RAC formed by two nodes. The default installation on ASM use just a controlfile. So I decided to add another one and the following are the steps I've done.

I'm using of course an spfile for my instance.
From a sqlplus sessions I needed to know where my current controlfile was and then altered the system to add another one. So I typed:
sql> show parameter control_files
sql> alter system set control_files='+DATA_RAC3/rac3/controlfile/current.260.706989187', '+DATA_RAC3' scope=spfile sid='*';


After I needed to put the instance in NOMOUNT mode, so as the oracle user, I typed:
srvctl stop database -d RAC3 -o immediate


From rman I was able to duplicate the controlfile, using the following commands:
$ rman nocatalog
RMAN>connect target
RMAN> restore controlfile from '+DATA_RAC3/rac3/controlfile/current.260.706989187';

After those commands, I put the database in OPEN mode, always from RMAN console:
RMAN> sql 'alter database mount';
RMAN> sql 'alter database open;


From a new sqlplus session I was able to see my new duplicated controlfile:
sql> select name from v$controlfile;


And now the last step. I needed to alter again the system, modifing the control_file parameter with the complete path of the new file:
sql> alter system set control_files='+DATA_RAC3/rac3/controlfile/current.260.706989187', '+DATA_RAC3/rac3/controlfile/current.268.707763013' scope=spfile sid='*';

7 comments:

  1. thanks dude..

    Manish Nashikkar
    India

    ReplyDelete
  2. Thank you. That saved me some time

    ReplyDelete
  3. Thank you for taking the time to post those instructions Marco!

    ReplyDelete
  4. exactly what i was looking for - thanks for posting such an elegant solution to this problem

    ReplyDelete