Oracle 19c RAC修改cluster name步骤

2024年 1月 10日 141.5k 0

19c rac修改cluster name

  • 适用范围
  • 问题概述
  • Cluster Rename 前提条件
  • 测试步骤
  • 参考文档

适用范围

Oracle Database - Enterprise Edition - Version 19.3.0.0.0 to 20.3.0.0.0 [Release 19 to 20.0]

问题概述

oracle 19c RAC 集群,安装集群时cluster name填写错误或因其它原因,需要进行修改集群名称。

Cluster Rename前提条件

  • Supported only for “Standalone Cluster”
  • Not supported for SIHA
  • Not supported if RHP Server or RHP Client is configured
  • Grid Infrastructure stack should be up on all nodes when the “Cluster Rename Procedure” listed below is performed
  • Requires unique new cluster name

测试步骤

1.查看当前集群名称。有如下几种方式可查:

[grid@+ASM1 /home/grid]$ crsctl get cluster name
CRS-6724: Current cluster name is 'zzjuat-cluster'
[grid@+ASM1 /home/grid]$ cemutlo -n
zzjuat-cluster
[grid@+ASM1 /home/grid]$ olsnodes -c
zzjuat-cluster
[grid@+ASM1 /home/grid]$

2.关闭数据库

[oracle@zzj1 /u01]$ srvctl stop database -d zzj

3.修改集群名称

使用root用户在集群中的任意一个节点上执行

[root@zzj-db1 ~]# /u01/app/19c/grid/bin/crsrename cluster zzj-cluster
CRS-42004: successfully set the cluster name; restart Oracle High Availability Services on all nodes for new cluster name to take effect
[root@zzj-db1 ~]#

4.关闭所有节点crs服务

--节点1
[root@zzj-db1 ~]# /u01/app/19c/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zzj-db1'
CRS-2673: Attempting to stop 'ora.crf' on 'zzj-db1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'zzj-db1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'zzj-db1'
CRS-2677: Stop of 'ora.gpnpd' on 'zzj-db1' succeeded
CRS-2677: Stop of 'ora.crf' on 'zzj-db1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'zzj-db1'
CRS-2677: Stop of 'ora.mdnsd' on 'zzj-db1' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'zzj-db1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zzj-db1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@zzj-db1 ~]# ps -ef|grep d.bin
root 19634 16862 0 10:51 pts/3 00:00:00 grep --color=auto d.bin
[root@zzj-db1 ~]#

--节点2
[root@zzj-db2 ~]# /u01/app/19c/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zzj-db2'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'zzj-db2'
CRS-2673: Attempting to stop 'ora.crf' on 'zzj-db2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'zzj-db2'
CRS-2677: Stop of 'ora.gpnpd' on 'zzj-db2' succeeded
CRS-2677: Stop of 'ora.crf' on 'zzj-db2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'zzj-db2'
CRS-2677: Stop of 'ora.mdnsd' on 'zzj-db2' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'zzj-db2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zzj-db2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@zzj-db2 ~]# ps -ef|grep d.bin
root 19634 16862 0 10:53 pts/3 00:00:00 grep --color=auto d.bin

5.启动crs服务

--节点1
[root@zzj-db1 ~]# /u01/app/19c/grid/bin/crsctl start crs -wait
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.evmd' on 'zzj-db1'
CRS-2676: Start of 'ora.mdnsd' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.evmd' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'zzj-db1'
CRS-2676: Start of 'ora.gpnpd' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'zzj-db1'
CRS-2676: Start of 'ora.gipcd' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'zzj-db1'
CRS-2676: Start of 'ora.cssdmonitor' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.diskmon' on 'zzj-db1'
CRS-2676: Start of 'ora.diskmon' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.crf' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.cssd' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.ctssd' on 'zzj-db1'
CRS-2676: Start of 'ora.ctssd' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'zzj-db1'
CRS-2676: Start of 'ora.asm' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'zzj-db1'
CRS-2676: Start of 'ora.storage' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'zzj-db1'
CRS-2676: Start of 'ora.crsd' on 'zzj-db1' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'zzj-db1'
CRS-6017: Processing resource auto-start for servers: zzj-db1
CRS-2672: Attempting to start 'ora.zzj-db1.vip' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.scan3.vip' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.scan2.vip' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.scan1.vip' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.chad' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.cvu' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.zzj-db2.vip' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.qosmserver' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.ons' on 'zzj-db1'
CRS-2676: Start of 'ora.cvu' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.chad' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.zzj-db1.vip' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'zzj-db1'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.zzj-db2.vip' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.scan3.vip' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'zzj-db1'
CRS-2676: Start of 'ora.scan2.vip' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'zzj-db1'
CRS-2676: Start of 'ora.scan1.vip' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'zzj-db1'
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.ons' on 'zzj-db1' succeeded
CRS-2676: Start of 'ora.qosmserver' on 'zzj-db1' succeeded
CRS-6016: Resource auto-start has completed for server zzj-db1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
[root@zzj-db1 ~]#

--节点2
[root@zzj-db2 ~]# /u01/app/19c/grid/bin/crsctl start crs -wait
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'zzj-db2'
CRS-2672: Attempting to start 'ora.evmd' on 'zzj-db2'
CRS-2676: Start of 'ora.evmd' on 'zzj-db2' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'zzj-db2'
CRS-2676: Start of 'ora.gpnpd' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'zzj-db2'
CRS-2676: Start of 'ora.gipcd' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'zzj-db2'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'zzj-db2'
CRS-2676: Start of 'ora.cssdmonitor' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'zzj-db2'
CRS-2672: Attempting to start 'ora.diskmon' on 'zzj-db2'
CRS-2676: Start of 'ora.diskmon' on 'zzj-db2' succeeded
CRS-2676: Start of 'ora.crf' on 'zzj-db2' succeeded
CRS-2676: Start of 'ora.cssd' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'zzj-db2'
CRS-2672: Attempting to start 'ora.ctssd' on 'zzj-db2'
CRS-2676: Start of 'ora.ctssd' on 'zzj-db2' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'zzj-db2'
CRS-2676: Start of 'ora.asm' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'zzj-db2'
CRS-2676: Start of 'ora.storage' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'zzj-db2'
CRS-2676: Start of 'ora.crsd' on 'zzj-db2' succeeded
CRS-6017: Processing resource auto-start for servers: zzj-db2
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'zzj-db1'
CRS-2672: Attempting to start 'ora.chad' on 'zzj-db2'
CRS-2672: Attempting to start 'ora.ons' on 'zzj-db2'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'zzj-db1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'zzj-db1'
CRS-2677: Stop of 'ora.scan1.vip' on 'zzj-db1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'zzj-db2'
CRS-2676: Start of 'ora.chad' on 'zzj-db2' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'zzj-db2'
CRS-33672: Attempting to start resource group 'ora.asmgroup' on server 'zzj-db2'
CRS-2672: Attempting to start 'ora.asmnet1.asmnetwork' on 'zzj-db2'
CRS-2676: Start of 'ora.asmnet1.asmnetwork' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'zzj-db2'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'zzj-db2' succeeded
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'zzj-db2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'zzj-db2'
CRS-2676: Start of 'ora.ons' on 'zzj-db2' succeeded
CRS-2676: Start of 'ora.asm' on 'zzj-db2' succeeded
CRS-33676: Start of resource group 'ora.asmgroup' on server 'zzj-db2' succeeded.
CRS-6016: Resource auto-start has completed for server zzj-db2
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.

6.检查集群服务

[grid@+ASM1 /u01/app/19c/grid/bin]$ crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
ora.chad
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
ora.net1.network
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
ora.ons
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 ONLINE OFFLINE STABLE
ora.DATA_DG.dg(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.FLASH_DG.dg(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.GRID_DG.dg(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE zzj-db2 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE zzj-db1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE zzj-db1 STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 Started,STABLE
2 ONLINE ONLINE zzj-db2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE zzj-db1 STABLE
ora.zzj-db1.vip
1 ONLINE ONLINE zzj-db1 STABLE
ora.zzj-db2.vip
1 ONLINE ONLINE zzj-db2 STABLE
ora.zzj.db
1 OFFLINE OFFLINE Instance Shutdown,ST
ABLE
2 OFFLINE OFFLINE Instance Shutdown,ST
ABLE
ora.zzj.main.svc
2 OFFLINE OFFLINE STABLE
ora.zzj.pub.svc
1 OFFLINE OFFLINE STABLE
2 OFFLINE OFFLINE STABLE
ora.qosmserver
1 ONLINE ONLINE zzj-db1 STABLE
ora.scan1.vip
1 ONLINE ONLINE zzj-db2 STABLE
ora.scan2.vip
1 ONLINE ONLINE zzj-db1 STABLE
ora.scan3.vip
1 ONLINE ONLINE zzj-db1 STABLE
--------------------------------------------------------------------------------

7.检查修改后的cluster name

[grid@+ASM1 /u01/app/19c/grid/bin]$ olsnodes -c
zzj-cluster

[oracle@zzj1 /u01]$

8.启动数据库

--启动
[oracle@zzj1 /u01]$ srvctl start database -d zzj
--检查
[grid@+ASM1 /u01/app/19c/grid/bin]$ crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
ora.chad
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
ora.net1.network
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
ora.ons
ONLINE ONLINE zzj-db1 STABLE
ONLINE ONLINE zzj-db2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 ONLINE OFFLINE STABLE
ora.DATA_DG.dg(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.FLASH_DG.dg(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.GRID_DG.dg(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE zzj-db2 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE zzj-db1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE zzj-db1 STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 Started,STABLE
2 ONLINE ONLINE zzj-db2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE zzj-db1 STABLE
ora.zzj-db1.vip
1 ONLINE ONLINE zzj-db1 STABLE
ora.zzj-db2.vip
1 ONLINE ONLINE zzj-db2 STABLE
ora.zzj.db
1 ONLINE ONLINE zzj-db1 Open,HOME=/u01/app/o
racle/product/19c/db
19c,STABLE
2 ONLINE ONLINE zzj-db2 Open,HOME=/u01/app/o
racle/product/19c/db
19c,STABLE
ora.zzj.main.svc
2 ONLINE ONLINE zzj-db2 STABLE
ora.zzj.pub.svc
1 ONLINE ONLINE zzj-db1 STABLE
2 ONLINE ONLINE zzj-db2 STABLE
ora.qosmserver
1 ONLINE ONLINE zzj-db1 STABLE
ora.scan1.vip
1 ONLINE ONLINE zzj-db2 STABLE
ora.scan2.vip
1 ONLINE ONLINE zzj-db1 STABLE
ora.scan3.vip
1 ONLINE ONLINE zzj-db1 STABLE
--------------------------------------------------------------------------------
[grid@+ASM1 /u01/app/19c/grid/bin]$

参考文档

Steps to rename the cluster name (Doc ID 2725377.1)

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论