首页 > 数据库 >Oracle RAC 更改DB_UNIQUE_NAME

Oracle RAC 更改DB_UNIQUE_NAME

时间:2023-04-21 19:24:08浏览次数:57  
标签:NAME instance db database DB srvctl test Oracle name

背景

遇到一个场景是更改 RAC 架构下的 Oracle DB_UNIQUE_NAME ,使得跟DB_NAME不一致,尝试了网上的方法,都没能成功,最后是看了官方support的solution,下面是主要操作步骤,11g203版本,已经验证是没问题的。

具体操作步骤

For example, a database that was originally created with Global Database Name "<database>" would have a db_name and db_unique_name of "<database>" and its corresponding CRS database resource would be named "ora.<database>.db". Changing the db_unique_name requires a complete restart of the database.

  1. Remove the database, instance and service resources from CRS, this does NOT affect database itself.
    $ srvctl stop database -d <database>
    $ srvctl remove database -d <database>

  2. Start the database and change the db_unique_name at database level.
    SQL> Startup;
    SQL> alter system set db_unique_name=<database>_test scope=spfile sid='';
    SQL> alter system set db_domain=<domain> scope=spfile sid='
    '; << only required when db_domain needs to be changed.
    SQL> alter database rename global_name to <database>_test.<domain>;

  3. Now add the database resource to cluster-level.
    $ srvctl add database -d <database>_test -n <node> -o <ORACLE_HOME>
    $ srvctl add instance -d <database>_test -i <instance1> -n <node1>
    $ srvctl add instance -d <database>_test -i <instance2> -n <node2>

  4. Create dependency between database and ASM instance so that database starts after ASM instance starts.
    $ srvctl modify instance -d <database>_test -i <instance1> -s +ASM1
    $ srvctl modify instance -d <database>_test -i <instance2> -s +ASM2Please
    note that, for 11.2, it is no longer required to modify at instance level, it should be done at database level:
    srvctl modify database -d <db_unique_name> -a "<diskgroup_list>
    "5) Create database service, the following example add service with both instances as preferred
    $ srvctl add service -d <database>_test -s <service> -r "<instance1>,<instance2>"

备注

IT 内容具有时效性,未避免更新后未同步,请点击查看最新内容:Oracle RAC 更改 DB_UNIQUE_NAME
文章首发于:http://nebofeng.com/2023/04/21/oracle-rac-%e6%9b%b4%e6%94%b9db_unique_name/

标签:NAME,instance,db,database,DB,srvctl,test,Oracle,name
From: https://www.cnblogs.com/nebofeng/p/17341479.html

相关文章

  • JDBC--API--PreparedStatement
     案例:  代码实现:  packageJDbc;importjava.sql.*;importjava.util.Scanner;publicclassjdbcdome_PreparedStatement{publicstaticvoidmain(String[]args)throwsClassNotFoundException,SQLException{Class.forName("com.mysql.jdb......
  • 老杜 JavaWeb 讲解(四) ——Servlet编写JDBC连接数据库
    老杜 JavaWeb 讲解对应视频:08-servlet中编写jdbc程序连接数据库(六)在Servlet(Java小程序)中编写JDBC连接数据库6.1JDBC介绍:JDBC的全称是Java数据库连接(JavaDatabaseconnect),它是一套用于执行SQL语句的JavaAPI。[1]JDBC(JavaDataBaseConnectivity)是Java编程语言中......
  • Oracle VM VirtualBox 全系列版本下载服务
    可提供OracleVMVirtualBox全系列版本下载服务:OracleVM3TemplateforOracleSunRaySoftwarewithOracleLinux5.3.0OracleVM3TemplatesforOracleLinux51.0.0.0.0OracleVM3TemplatesforOracleLinux61.0.0.0.0OracleVM3TemplatesforOracleLinux6......
  • JDBC--API --ResultSet
        importjava.sql.*;publicclassjdbcdome_ResultSet{publicstaticvoidmain(String[]args)throwsClassNotFoundException,SQLException{Class.forName("com.mysql.jdbc.Driver");Stringurl="jdbc:mysql://127.0.......
  • shardingjdbc
    shardingjdbc:轻量级数据库中间层,实现分表分库HikariCP:当下比较火的数据库连接池qiniu-java-sdk:此SDK适用于Java7及以上版本。使用此SDK构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到......
  • JDBC--API--Statement
    importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.SQLException;importjava.sql.Statement;publicclassjdbcdemo_Statement{publicstaticvoidmain(String[]args)throwsClassNotFoundException,SQLException{Class.forName......
  • Oracle:分页
    SQL: Selectenamefromempwhereenamelike'_M%'第二个字母Selectto_char(sysdate,'yyyy')afromdual//2018selectdeptno,job,avg(sal)fromempgroupbyjob,deptno部门职员平均工资select*fromempdeptselect*fromemp,deptwhereemp.deptno......
  • oracle:触发、分页
    分页解释:intindex=1;intsize=5;intstart=(index-1)*size+1;intend=index*size;--115--2610wheremrbetween6and10select*from(selecta.*,rownummrfromempa)wheremr>=6andmr<=10 触发:createorreplacefunctionf(xnumber)returnnumberi......
  • 基于“ModBus写文件”实现STM32串口IAP升级固件(上)
    文章目录一、ModBus协议1.10x15(写文件)请求响应例程二、上位机2.1预定义2.2主要流程图2.3界面2.4主要程序读取信息按钮-点击事件升级固件按钮-点击事件一、ModBus协议ModBus是一个应用层的通信协议,广泛应用于工业控制等领域。主要功能码有0x03(读多个寄存器),0x10(写多个寄存器),0......
  • Modbus协议整理
    文章目录01读线圈状态示例02读输入位状态示例03读保持寄存器示例04读输入寄存器示例05写单个线圈示例06写单个保持寄存器示例15写多个线圈示例16写多个保持寄存器示例01读线圈状态读取从机的线圈状态(ON/OFF),位操作。例:请求从机设备17读00020-00056线圈。其中00020-00056......