• RAC+ASM 添加控制文件


    • 环境介绍: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
    
  • 相关阅读:
    带你玩转Flink流批一体分布式实时处理引擎
    都2022年了,你的前端工具集应该有vueuse
    云图说|图解DGC:基于华为智能数据湖解决方案的一体化数据治理平台
    面试官: Flink双流JOIN了解吗? 简单说说其实现原理
    4种Spring Boot 实现通用 Auth 认证方式
    这8个JS 新功能,你应该去尝试一下
    Scrum Master需要具备哪些能力和经验
    dart系列之:时间你慢点走,我要在dart中抓住你
    dart系列之:数学什么的就是小意思,看我dart如何玩转它
    dart系列之:还在为编码解码而烦恼吗?用dart试试
  • 原文地址:https://www.cnblogs.com/tinazzz/p/8328043.html
Copyright © 2020-2023  润新知