暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oracle修改网络相关操作

原创 _ 云和恩墨 2022-12-19
1437

一、修改公共IP、VIP(方案一)

172.16.220.53 erp51vip 
172.16.220.54 erp52vip
1.1、检查状态
[grid@erp51:/home/grid]$srvctl status vip -n erp51
VIP 172.16.220.53 is enabled
VIP 172.16.220.53 is running on node: erp51
[grid@erp51:/home/grid]$srvctl status vip -n erp52
VIP 172.16.220.54 is enabled
VIP 172.16.220.54 is running on node: erp52
1.2检查配置
[grid@erp51:/home/grid]$srvctl config vip -n erp51
VIP exists: network number 1, hosting node erp51
VIP Name: erp51vip
VIP IPv4 Address: 172.16.220.53
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
[grid@erp51:/home/grid]$srvctl config vip -n erp52
VIP exists: network number 1, hosting node erp52
VIP Name: erp52vip
VIP IPv4 Address: 172.16.220.54
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
1.3、停止两节点的监听及vip资源
[grid@erp51:/home/grid]$srvctl stop listener -n erp51
srvctl stop listener -n erp52

[grid@erp51:/home/grid]$srvctl stop listener -n erp52
VIP 172.16.220.54 is enabled
VIP 172.16.220.54 is running on node: erp52
1.4、在所有节点/etc/hosts文件中修改新vip地址
172.16.220.153 erp51vip
172.16.220.154 erp52vip
1.5、修改ocr注册信息
[root@erp51 ~]# /u01/app/19.0.0/grid/bin/srvctl modify nodeapps -n erp51 -A 172.16.220.153/255.255.255.0/ens33

[root@erp51 ~]# /u01/app/19.0.0/grid/bin/srvctl modify nodeapps -n erp52 -A 172.16.220.154/255.255.255.0/ens33
1.6、检查配置
[grid@erp51:/home/grid]$srvctl config vip -n erp51
VIP exists: network number 1, hosting node erp51
VIP Name: erp51vip
VIP IPv4 Address: 172.16.220.153
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
[grid@erp51:/home/grid]$srvctl config vip -n erp52
VIP exists: network number 1, hosting node erp52
VIP Name: erp52vip
VIP IPv4 Address: 172.16.220.154
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
1.7、启动
[grid@erp51:/home/grid]$srvctl start vip -n erp51
PRKO-2420 : VIP erp51vip is already started on nodes: erp51

[grid@erp51:/home/grid]$srvctl start vip -n erp52
PRKO-2420 : VIP erp52vip is already started on nodes: erp52
1.8、启动监听
[grid@erp51:/home/grid]$srvctl start listener -n erp51
[grid@erp51:/home/grid]$srvctl start listener -n erp52
1.9、检查
crsctl status res -t
ora.erp51.vip     1        ONLINE  ONLINE       erp51                    STABLE
ora.erp52.vip     1        ONLINE  ONLINE       erp52                    STABLE

[grid@erp51:/home/grid]$srvctl status vip -n erp51
VIP 172.16.220.153 is enabled
VIP 172.16.220.153 is running on node: erp51
[grid@erp51:/home/grid]$srvctl status vip -n erp52
VIP 172.16.220.154 is enabled
VIP 172.16.220.154 is running on node: erp52

[grid@erp51:/home/grid]$srvctl config vip -n erp51
VIP exists: network number 1, hosting node erp51
VIP Name: erp51vip
VIP IPv4 Address: 172.16.220.153
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
[grid@erp51:/home/grid]$srvctl config vip -n erp52
VIP exists: network number 1, hosting node erp52
VIP Name: erp52vip
VIP IPv4 Address: 172.16.220.154
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes:

此时监听状态并中并没有172.16.220.154,需重启crs

1.10、重启crs
[root@erp52 ~]# /u01/app/19.0.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'erp52'
CRS-2673: Attempting to stop 'ora.crsd' on 'erp52'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'erp52'
CRS-2673: Attempting to stop 'ora.qosmserver' on 'erp52'
CRS-2673: Attempting to stop 'ora.erpdb.db' on 'erp52'
CRS-2673: Attempting to stop 'ora.chad' on 'erp52'
CRS-2677: Stop of 'ora.erpdb.db' on 'erp52' succeeded
CRS-33673: Attempting to stop resource group 'ora.asmgroup' on server 'erp52'
CRS-2673: Attempting to stop 'ora.DGDATA02.dg' on 'erp52'
CRS-2673: Attempting to stop 'ora.DGGRID.dg' on 'erp52'
CRS-2673: Attempting to stop 'ora.DGDATA01.dg' on 'erp52'
CRS-2673: Attempting to stop 'ora.DGRECOVERY.dg' on 'erp52'
CRS-2673: Attempting to stop 'ora.DGSYSTEM.dg' on 'erp52'
CRS-2673: Attempting to stop 'ora.DGGRID01.dg' on 'erp52'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'erp52'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'erp52'
CRS-2673: Attempting to stop 'ora.cvu' on 'erp52'
CRS-2677: Stop of 'ora.DGDATA02.dg' on 'erp52' succeeded
CRS-2677: Stop of 'ora.DGRECOVERY.dg' on 'erp52' succeeded
CRS-2677: Stop of 'ora.DGDATA01.dg' on 'erp52' succeeded
CRS-2677: Stop of 'ora.DGGRID.dg' on 'erp52' succeeded
CRS-2677: Stop of 'ora.DGSYSTEM.dg' on 'erp52' succeeded
CRS-2677: Stop of 'ora.DGGRID01.dg' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'erp52'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'erp52'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'erp52' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.erp52.vip' on 'erp52'
CRS-2677: Stop of 'ora.asm' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'erp52'
CRS-2677: Stop of 'ora.cvu' on 'erp52' succeeded
CRS-2677: Stop of 'ora.erp52.vip' on 'erp52' succeeded
CRS-2677: Stop of 'ora.qosmserver' on 'erp52' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.asmnet1.asmnetwork' on 'erp52'
CRS-2677: Stop of 'ora.asmnet1.asmnetwork' on 'erp52' succeeded
CRS-33677: Stop of resource group 'ora.asmgroup' on server 'erp52' succeeded.
CRS-2675: Stop of 'ora.chad' on 'erp52' failed
CRS-2679: Attempting to clean 'ora.chad' on 'erp52'
CRS-2681: Clean of 'ora.chad' on 'erp52' succeeded
CRS-2672: Attempting to start 'ora.qosmserver' on 'erp51'
CRS-2672: Attempting to start 'ora.scan1.vip' on 'erp51'
CRS-2672: Attempting to start 'ora.cvu' on 'erp51'
CRS-2672: Attempting to start 'ora.erp52.vip' on 'erp51'
CRS-2676: Start of 'ora.cvu' on 'erp51' succeeded
CRS-2676: Start of 'ora.erp52.vip' on 'erp51' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'erp51' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'erp51'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'erp51' succeeded
CRS-2676: Start of 'ora.qosmserver' on 'erp51' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'erp52'
CRS-2677: Stop of 'ora.ons' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'erp52'
CRS-2677: Stop of 'ora.net1.network' on 'erp52' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'erp52' has completed
CRS-2677: Stop of 'ora.crsd' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'erp52'
CRS-2673: Attempting to stop 'ora.crf' on 'erp52'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'erp52'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'erp52'
CRS-2677: Stop of 'ora.drivers.acfs' on 'erp52' succeeded
CRS-2677: Stop of 'ora.crf' on 'erp52' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'erp52' succeeded
CRS-2677: Stop of 'ora.asm' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'erp52'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'erp52'
CRS-2673: Attempting to stop 'ora.evmd' on 'erp52'
CRS-2677: Stop of 'ora.ctssd' on 'erp52' succeeded
CRS-2677: Stop of 'ora.evmd' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'erp52'
CRS-2677: Stop of 'ora.cssd' on 'erp52' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'erp52'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'erp52'
CRS-2677: Stop of 'ora.gpnpd' on 'erp52' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'erp52' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'erp52' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@erp52 ~]# /u01/app/19.0.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
1.11、检查监听状态
[grid@erp52:/home/grid]$lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 08-DEC-2022 19:35:26

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                08-DEC-2022 19:33:33
Uptime                    0 days 0 hr. 1 min. 52 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/19.0.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/erp52/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.220.52)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.220.154)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=erp52)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/19.0.0/db_1/admin/erpdb/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DGDATA01" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DGDATA02" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DGGRID" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DGGRID01" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DGRECOVERY" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DGSYSTEM" has 1 instance(s).
  Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "erpdb" has 1 instance(s).
  Instance "erpdb2", status READY, has 1 handler(s) for this service...
Service "erpdbXDB" has 1 instance(s).
  Instance "erpdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
1.12、连接测试
[oracle@erp51:/home/oracle]$sqlplus scott/tiger@172.16.220.153/erpdb

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 8 19:38:37 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Last Successful login time: Thu Aug 18 2022 13:25:51 +08:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> 
1.13、修改local_listener
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.220.153)(PORT=1521))' sid = 'erp51';
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.220.154)(PORT=1521))' sid = 'erp52';

二、修改IP、VIP(方案二)

172.16.220.153 erp51vip   --> 172.16.220.53
172.16.220.154 erp52vip   --> 172.16.220.54
2.1、收集当前 VIP 配置
[grid@erp51:/home/grid]$srvctl config nodeapps -a
Network 1 exists
Subnet IPv4: 172.16.220.0/255.255.255.0/ens33, static
Subnet IPv6: 
Ping Targets: 
Network is enabled
Network is individually enabled on nodes: 
Network is individually disabled on nodes: 
VIP exists: network number 1, hosting node erp51
VIP Name: erp51vip
VIP IPv4 Address: 172.16.220.153
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
VIP exists: network number 1, hosting node erp52
VIP Name: erp52vip
VIP IPv4 Address: 172.16.220.154
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes
2.2、验证VIP身份
crsctl status res -t
ora.erp51.vip      1        ONLINE  ONLINE       erp51                    STABLE
ora.erp52.vip      1        ONLINE  ONLINE       erp52                    STABLE

[grid@erp51:/home/grid]$ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.51  netmask 255.255.255.0  broadcast 172.16.220.255
        inet6 fe80::4418:3d62:b06c:44be  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)
        RX packets 1814176  bytes 2291017193 (2.1 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1065007  bytes 661053224 (630.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.153  netmask 255.255.255.0  broadcast 172.16.220.255
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)

ens33:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.55  netmask 255.255.255.0  broadcast 172.16.220.255
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)
2.3、 停止 nodeapps 资源(以及所有依赖资源 ASM/DB,仅在需要时):
srvctl stop instance -d erpdb -n erp51
srvctl stop vip -n erp51 -f
2.4、验证VIP现在OFFLINE,接口不再绑定公网接口
ora.erp51.vip      1        OFFLINE OFFLINE                               STABLE
ora.erp52.vip      1        ONLINE  ONLINE       erp52                    STABLE

ora.erpdb.db      1        ONLINE  ONLINE       erp52                    Open,HOME=/u01/app/oracle/product/19.0.0/db_1,STABLE
                  2        OFFLINE OFFLINE                               Instance Shutdown,STABLE
				  
[grid@erp51:/home/grid]$ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.51  netmask 255.255.255.0  broadcast 172.16.220.255
        inet6 fe80::4418:3d62:b06c:44be  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)
        RX packets 1862124  bytes 2339582370 (2.1 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1113740  bytes 706817041 (674.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.55  netmask 255.255.255.0  broadcast 172.16.220.255
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)
2.5、修改etc/hosts
2.6、修改VIP资源,root用户:
[grid@erp51:/home/grid]$srvctl modify nodeapps -n erp51 -A 172.16.220.53/255.255.255.0/ens33
2.7、 验证更改
[grid@erp51:/home/grid]$srvctl config nodeapps -n erp51 -a
PRKO-2207 : Warning:-node option has been deprecated and will be ignored.
Network 1 exists
Subnet IPv4: 172.16.220.0/255.255.255.0/ens33, static
Subnet IPv6: 
Ping Targets: 
Network is enabled
Network is individually enabled on nodes: 
Network is individually disabled on nodes: 
VIP exists: network number 1, hosting node erp51
VIP Name: erp51vip
VIP IPv4 Address: 172.16.220.53
VIP IPv6 Address: 
VIP is enabled.
VIP is individually enabled on nodes: 
VIP is individually disabled on nodes: 
2.8、 以 Oracle Clusterware 所有者的身份启动 nodeapps 和其他资源

注意:如果更改了网络属性,即更改了网络掩码,请重新启动 nodeapps

[grid@erp51:/home/grid]$srvctl start vip -n erp51
srvctl start listener -n erp51
srvctl start instance -d erpdb -n erp51
[grid@erp51:/home/grid]$srvctl start listener -n erp51
PRCC-1015 : LISTENER was already running on erp51
PRCR-1004 : Resource ora.LISTENER.lsnr is already running
[grid@erp51:/home/grid]$srvctl start instance -d erpdb -n erp51
2.9、验证新VIP是否在线并绑定到公网接口
[grid@erp51:/home/grid]$ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.51  netmask 255.255.255.0  broadcast 172.16.220.255
        inet6 fe80::4418:3d62:b06c:44be  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)
        RX packets 1907009  bytes 2384916647 (2.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1150308  bytes 724083642 (690.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens33:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.53  netmask 255.255.255.0  broadcast 172.16.220.255
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)

ens33:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.220.55  netmask 255.255.255.0  broadcast 172.16.220.255
        ether 00:0c:29:3a:e9:c8  txqueuelen 1000  (Ethernet)
		

[grid@erp51:/home/grid]$crsctl status res -t
ora.erp51.vip      1        ONLINE  ONLINE       erp51                    STABLE
ora.erp52.vip      1        ONLINE  ONLINE       erp52                    STABLE

ora.LISTENER.lsnr
               ONLINE  ONLINE       erp51                    STABLE
               ONLINE  ONLINE       erp52                    STABLE
			   
[grid@erp51:/home/grid]$lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 08-DEC-2022 20:40:35

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                08-DEC-2022 20:40:28
Uptime                    0 days 0 hr. 0 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/19.0.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/erp51/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.220.51)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.220.53)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=erp51)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/19.0.0/db_1/admin/erpdb/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "erpdb" has 1 instance(s).
  Instance "erpdb1", status READY, has 1 handler(s) for this service...
Service "erpdbXDB" has 1 instance(s).
  Instance "erpdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
2.10、其它节点重复该步骤。
2.11、修改 listener.ora、tnsnames.ora 和 LOCAL_LISTENER/REMOTE_LISTENER 参数。

注意,ASM和DB的LOCAL_LISTENER由Grid Infrastructure 自动设置。LOCAL_LISTENER 中的 VIP 更改应自动生效。
由于Bug 22824602,在某些竞争条件下,ASM 实例的 LOCAL_LISTENER可能无法反映VIP更改。解决方法是在受影响的节点上重新启动集群件

三、修改 SCAN 名称或 SCAN VIP 地址

3.1、停止资源

[grid@erp51:/home/grid]$srvctl config scan
SCAN name: erpscan, Network: 1
Subnet IPv4: 172.16.220.0/255.255.255.0/ens33, static
Subnet IPv6: 
SCAN 1 IPv4 VIP: 172.16.220.55

[grid@erp51:/home/grid]$srvctl stop scan
PRCR-1065 : Failed to stop resource ora.scan1.vip
CRS-2974: unable to act on resource 'ora.scan1.vip' on server 'erp52' because that would require stopping or relocating resource 'ora.LISTENER_SCAN1.lsnr' but the appropriate force flag was not specified

[grid@erp51:/home/grid]$srvctl stop scan_listener
[grid@erp51:/home/grid]$srvctl stop scan 

3.2、root用户修改scan

[root@erp51 ~]# /u01/app/19.0.0/grid/bin/srvctl modify scan -n scan

3.3、修改scan_listener启动

[grid@erp51:/home/grid]$srvctl modify  scan_listener -u
[grid@erp51:/home/grid]$srvctl start scan_listener

[grid@erp51:/home/grid]$srvctl config scan
SCAN name: scan, Network: 1
Subnet IPv4: 172.16.220.0/255.255.255.0/ens33, static
Subnet IPv6: 
SCAN 1 IPv4 VIP: 172.16.220.56
SCAN VIP is enabled.

[grid@erp51:/home/grid]$lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 20-DEC-2022 06:26:32

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                20-DEC-2022 06:20:56
Uptime                    0 days 0 hr. 5 min. 36 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/19.0.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/erp52/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.220.56)(PORT=1521)))
Services Summary...
Service "erpdb" has 2 instance(s).
  Instance "erpdb1", status READY, has 1 handler(s) for this service...
  Instance "erpdb2", status READY, has 1 handler(s) for this service...
Service "erpdbXDB" has 2 instance(s).
  Instance "erpdb1", status READY, has 1 handler(s) for this service...
  Instance "erpdb2", status READY, has 1 handler(s) for this service...
The command completed successfully

修改完成,注意修改数据库的remote_listener

四、修改scan_listener监听端口

[grid@erp52:/home/grid]$srvctl modify scan_listener -p 1527
[grid@erp52:/home/grid]$srvctl stop scan_listener
srvctl start scan_listener
[grid@erp52:/home/grid]$srvctl start scan_listener
[grid@erp52:/home/grid]$srvctl config scan_listener
SCAN Listeners for network 1:
Registration invited nodes: 
Registration invited subnets: 
Endpoints: TCP:1527
SCAN Listener LISTENER_SCAN1 exists
SCAN Listener is enabled.

五、修改主机名

公共主机名记录在 OCR 中,它是在安装阶段输入的。安装后不能修改。修改公共主机名的唯一方法是删除节点,然后使用新主机名重新添加节点,或者重新安装集群件或按照克隆过程重新配置集群件。

六、修改公共网络接口、子网或网络掩码

\[root\@erp52 u01]# /u01/app/19.0.0/grid/bin/oifcfg delif -global ens33/255.255.255.0
\[root\@erp52 u01]# /u01/app/19.0.0/grid/bin/oifcfg setif -global ens33/255.255.255.0\:public
PRIF-15: invalid subnet value specified  --19.3.0测试有bug

七、修改私有网络主机名

在11.2之前的Oracle Clusterware中,私有主机名记录在OCR中,不能更新。通常,私有主机名不需要更改。可以更改其关联的IP。更改专用主机名的唯一方法是删除/添加节点,或者重新安装Oracle Clusterware。

在11.2版网格基础设施中,私有主机名不再记录在OCR中,并且不依赖于私有主机名。可以在/etc/hosts中自由更改。

八、修改私有网络IP

网络接口名称和子网保持不变情况下关闭crs,直接修改/etc/hosts即可。

九、修改私有网络MTU

关闭crs修改MTU即可。

十、修改私有网络接口名称、子网或网络掩码

How to Modify Private Network Information in Oracle Clusterware (Doc ID 283684.1)
最后修改时间:2022-12-26 09:56:03
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论