• 环境介绍:11g RAC 使用 ASM 磁盘组,控制文件只有一个,需要进行添加

  • 参照 MOS 文档 How to Multiplex Control File In RAC Database (文档 ID 1642374.1)

    1. 查看数据库版本
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0  Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
    1. 查看控制文件
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA01/rac/controlfile/current.256.955886921
    1. 修改控制文件参数,添加新的磁盘组
SQL> alter system set control_files='+DATA01/rac/controlfile/current.256.955886921', '+FRA' scope=spfile sid='*;
    1. 关闭 RAC 数据库实例,然后启动到 nomount 状态
[grid@rac1 ~]$ srvctl stop database -d rac
[grid@rac1 ~]$ srvctl start database -d rac -o nomount
    1. 检查 control_files 参数
SQL> show parameter control_files
NAME           TYPE         VALUE
-------------- ------------ -------------------------------------------------
control_files  string       +DATA01/rac/controlfile/current.256.955886921,+FRA
    1. 在其中一个节点上启动 RMAN,使用 restore 命令复制一份控制文件
[oracle@rac1 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Sep 29 17:11:09 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: rac (not mounted)
RMAN> restore controlfile from '+DATA01/rac/controlfile/current.256.955886921';
Starting restore at 2017-09-29 17:16:00
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1123 instance=rac1 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA01/rac/controlfile/current.256.955886921
output file name=+FRA/rac/controlfile/current.266.955991761
Finished restore at 2017-09-29 17:16:01
    1. 修改 control_files 参数
SQL> alter system set control_files='+DATA01/rac/controlfile/current.256.955886921','+FRA/rac/controlfile/current.266.955991761' scope=spfile sid='*';
    1. 关闭数据库,然后正常启动
[grid@rac1 ~]$ srvctl stop database -d rac
[grid@rac1 ~]$ srvctl start database -d rac
    1. 验证是否添加成功
SQL> show parameter control_files
NAME           TYPE         VALUE
-------------- ------------ -------------------------------------------------
control_files  string       +DATA01/rac/controlfile/current.256.955886921,+FRA/rac/controlfile/current.266.955991761
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA01/rac/controlfile/current.256.955886921
+FRA/rac/controlfile/current.266.955991761
05-02 03:37