How to Multiplex the Oracle Controlfile in ASM

You may face a situation where you have to multiplex the controlfile across multiple diskgroups, especially after the database is created. However with ASM, this activity is not as simple as it is with filesystems where you can copy files from one folder/directory to another and then edit the init.ora parameter file to add the new location.

In order to multiplex / move the controlfile to a different diskgroup, you can use the following procedure.

(This procedure assumes that you are using the OMF feature by setting the db_create_file_dest parameter.)

  1. Log on to SQLPlus as a DBA or SYSDBA and get the ASM name of the current controlfile
    . oraenv (set the database sid)
    sqlplus / as sysdba
    SQL> select name from v$controlfile;
    NAME
    ------------------------------------------------------------------------------------------------------
    +FRA_DG/dwdev/controlfile/current.269.758046553
    1 row selected.
    SQL> exit
  2. Shut down the database. If this a RAC environment, you will perform this procedure on one cluster node.
    srvctl stop database -d dwdev
  3. Invoke RMAN to copy the control file:
    rman target /
    RMAN> startup nomount;
    RMAN> restore controlfile to '+DATAT_DG' from '+FRA_DG/dwdev/controlfile/current.269.758046553'; <
    RMAN> exit
  4. Invoke asmcmd to get the ASM name of the new controlfile copy
    . oraenv (set the +ASM sid)
    asmcmd -p
    ASMCMD> cd datat*/dwt*/con*
    ASMCMD [+DATAD_DG/DWDEV/CONTROLFILE] > ls -l
    Type Redund Striped Time Sys Name
    CONTROLFILE UNPROT FINE AUG 02 14:00:00 Y current.263.758126875
    ASMCMD [+DATAD_DG/DWDEV/CONTROLFILE] > exit 
  5. Log on SQLPlus as SYSDBA to update the spfile and then mount and open the database
    . oraenv (set the database sid)
    sqlplus / as sysdba
    SQL> alter system set control_files='+FRA_DG/dwdev/controlfile/current.269.758046553','+DATAT_DG/DWDEV/CONTROLFILE/current.263.758126875' scope=spfile;
    SQL> startup force ;
    SQL> select name from v$controlfile;
    NAME
    ------------------------------------------------------------------------------------------
    +FRA_DG/dwdev/controlfile/current.269.758046553
    +DATAD_DG/dwtst/controlfile/current.263.758126875
    2 rows selected.
    SQL> sho parameter control_files
    NAME TYPE VALUE
    ——————————————————————————————
    control_files string +FRA_DG/dwdev/controlfile/curr
    ent.269.758046553, +DATAD_DG/d
    wtst/controlfile/current.263.7
    58126875

At this point, the controlfile is multiplexed between two diskgroups ◊ +FRA_DG and +DATAD_DG

 

By |2017-09-20T08:45:42+00:00September 11th, 2013|Tips|Comments Off on How to Multiplex the Oracle Controlfile in ASM