zoukankan      html  css  js  c++  java
  • 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
    
  • 相关阅读:
    ssm框架搭建出现的异常:The import org.springframework cannot be resolved
    ssm框架中的乱码问题的解决
    json语法和使用
    AJAX概述和简单使用
    JavaScript给动态插入的元素添加事件绑定
    Vue常用开源项目汇总
    ERROR in Template execution failed: ReferenceError: htmlwebpackPlugin is not defined
    Error: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimizat
    vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin
    Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
  • 原文地址:https://www.cnblogs.com/tinazzz/p/8328043.html
Copyright © 2011-2022 走看看