Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How oracle 11gr2rac modifies ip address

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces oracle 11gr2rac how to modify the ip address, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Oracle 11g rac modify IP

Modified IP on a set of RAC. Including pub,vip,scan5 IP. The reference documents are as follows:

11GR2 RAC modify vip,public ip,private ip,scan vip

Implementation steps

1 purpose of modification

According to the needs of the business, the original temporary IP needs to be changed to production ip. The following is the corresponding IP table before and after adjustment.

Corresponding ip table before adjustment

Hostname type IP address Nic port

P570a public ip 192.168.128.10 en0

P570a-vip vip 192.168.128.12 en0

P570a-priv private ip 172.168.128.10 en2

P570b public ip 192.168.128.11 en0

P570b-vip vip 192.168.128.13 en0

P570b-priv private ip 172.168.128.11 en2

Scan-vip scan 192.168.128.100 en0

Adjusted corresponding ip table

Hostname type IP address Nic port

P570a public ip 10.76.31.112 en0

P570a-vip vip 10.76.31.113 en0

P570a-priv private ip 192.76.31.113 en8

P570b public ip 10.76.31.114 en0

P570b-vip vip 10.76.31.115 en0

P570b-priv private ip 192.76.31.115 en8

Scan-vip scan 10.76.31.111 en0

The network card port can be displayed with ifconfig-a

2 modify public ip,vip,scan vip

2.1 stop the database of both nodes, listen, and stop crs

Grid user

Srvctl stop database-d gdcdc-o immediate

Srvctl stop listener-n p570a

Srvctl stop listener-n p570b

Root user

Cd / grid/app/11.2.0/grid/bin

. / crsctl stop crs

You can use ps-ef | grep grid to see whether the process is completely shut down.

2.2 modify the / etc/hosts file of the nodes on both sides

Make a backup before you modify it

Cp / etc/hosts / etc/hosts.bak

After modification, it is as follows:

10.76.31.112 p570a

10.76.31.113 p570a-vip

172.168.128.10 p570a-priv

10.76.31.114 p570b

10.76.31.115 p570b-vip

172.168.128.11 p570b-priv

10.76.31.111 scan-vip

Note that the ip address of the private network will not be modified for the time being, but will be modified when the private ip is modified.

2.3 modify public ip,vip,scan vip on both nodes

2.3.1 modify p570a node public ip

Modify the physical ip with the smitty command

Smitty tcpip

Select en0

Modify ip to 10.76.31.112 and gateway to 10.76.31.1

The mask is 255.255.255.0

2.3.2 modify P570b node public ip

Modify the physical ip with the smitty command

Smitty tcpip

Select en0

Modify ip to 10.76.31.114 and gateway to 10.76.31.1

The mask is 255.255.255.0

2.3.3 the nodes on both sides start crs and modify public ip with the oifcfg command

One side of the node can do it.

Cd / grid/app/11.2.0/grid/bin

. / crsctl start crs

Root user

Use oifcfg getif to view the current settings first

. / oifcfg getif

En0 192.168.128.0 global public

En2 172.168.128.0 global cluster_interconnect

Modify

. / oifcfg delif-global en0

. / oifcfg setif-global en0/10.76.31.0:public

Confirmation of nodes on both sides

. / oifcfg getif

En0 10.76.31.0 global public

En2 172.168.128.0 global cluster_interconnect

2.3.4 modify VIP

Close database

Run the following command under the root user

Cd / grid/app/11.2.0/grid/bin

. / srvctl stop database-d gdcdc-o immediate

Check vip settings with srvctl config vip

$srvctl config vip-n p570a

VIP exists.:p570a

VIP exists.: / p570a-vip/192.168.128.12/255.255.255.0/eth0

$srvctl config vip-n p570b

VIP exists.:p570b

VIP exists.: / p570b-vip/192.168.128.13/255.255.255.0/eth0

Stop the vip service and modify vip

. / srvctl stop listener-n p570a

. / srvctl stop listener-n p570b

. / srvctl stop vip-n p570a

. / srvctl stop vip-n p570b

. / srvctl modify nodeapps-n p570a-A 10.76.31.113/255.255.255.0/en0

. / srvctl modify nodeapps-n p570b-A 10.76.31.115/255.255.255.0/en0

Confirm whether the modification is successful

. / srvctl config vip-n p570a

VIP exists.:p570a

VIP exists.:/p570a-vip/10.76.31.113/255.255.255.0/en0

. / srvctl config vip-n p570b

VIP exists.:p570b

VIP exists.:/p570b-vip/10.76.31.115/255.255.255.0/en0

Start vip service, monitor, database

. / srvctl start vip-n p570a

. / srvctl start vip-n p570b

. / srvctl start listener-n p570a

. / srvctl start listener-n p570b

. / srvctl start database-d gdcdc

2.3.5 modify local_listener parameters by nodes on both sides

Show parameter local_listener

NAME TYPE VALUE

-

Local_listener string (DESCRIPTION= (ADDRESS_LIST= (AD)

DRESS= (PROTOCOL=TCP) (HOST=192.

168.128.12) (PORT=1521)

Alter system set local_listener=' (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=10.76.31.113) (PORT=1521) 'scope=both sid='gdcdc1'

Alter system set local_listener=' (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=10.76.31.115) (PORT=1521) 'scope=both sid='gdcdc2'; page 6 of 11 pages

2.3.6 modify SCAN VIP

1.srvctl config scan View current vip Settings

Config scan SCAN name: 192.168.128.100, Network: 1/192.168.128.0/255.255.255.0/en0 SCAN VIP name: scan1, IP: / scan-vip/192.168.128.100

two。 Stop scan_listener and sacn vip with root user

$GRID_HOME/bin/srvctl stop scan_listener $GRID_HOME/bin/srvctl stop scan $GRID_HOME/bin/srvctl status scan

SCAN VIP scan1 is enabled SCAN VIP scan1 is not running

$GRID_HOME/bin/srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is not running

3. Modify scan vip with root user

$GRID_HOME/bin/srvctl modify scan-n 10.76.31.111

4. Check whether the modification is successful

Config scan SCAN name: 10.76.31.111, Network: 1/10.76.31.0/255.255.255.0/en0 SCAN VIP name: scan1, IP: / scan-vip/10.76.31.111

5. Start scan and scan_listener

$GRID_HOME/bin/srvctl start scan $GRID_HOME/bin/srvctl start scan_listener

3 modify private ip

3.1 make sure the crs cluster is open

You can use olsnodes-s to check the status of the cluster

. / olsnodes-s

P570a Active

P570b Active

3.2Modification of current private settings with oifcfg getif check and oifcfg setif

Settings before modification

. / oifcfg getif

En0 10.76.31.0 global public

En2 172.168.128.0 global cluster_interconnect

Modify private ip, and the new network port number is en8. If the port number is not modified, the value is set.

Or for en2?

. / oifcfg setif-global en8/192.76.31.0:cluster_interconnect

. / oifcfg delif-global en2

Settings after modification

. / oifcfg getif

En0 10.76.31.0 global public

En8 192.76.31.0 global cluster_interconnect

3.3.The nodes on both sides stop database and crs

. / srvctl stop database-d gdcdc-o immedate

. / crsctl stop crs

Check if it is closed

Ps-ef | grep grid

Ps-ef | grep oracle

3.4 modify both sides of the node / etc/hosts table

172.168.128.10 p570a-priv

172.168.128.11 p570b-priv

Modify to

192.76.31.113 p570a-priv

192.76.31.115 p570b-priv

3.5 modify p570a node private ip

Modify physical private network ip with smitty command

Smitty tcpip

Select en8

Modify ip to 192.76.31.113 mask to 255.255.255.0

3.6 modify P570b node private ip

Modify physical private network ip with smitty command

Smitty tcpip

Select en8

Modify ip to 192.76.31.115 mask to 255.255.255.0

3.7Node on both sides start crs

Crsctl start crs

Check resource group status

Crsctl status resource-t

If all online, then no problem.

4 implementation summary

1. When modifying the public ip, be careful to modify the correct gateway. If you do not modify it, the vip service may not work.

two。 Pay attention to check and modify the hosts file, because after changing the ip, the hosts file will add records.

The mask corresponding to public ip should also be modified correctly.

3. The hostname should be planned when installing crs, and once installed, it cannot be modified, otherwise you will have to reinstall crs.

4. Add config vip command to 11GR2 srvctl

5. The order of modifying private ip is just the opposite of 10gR2. 10gR2 first closes crs, then modifies hosts table and physical ip, then starts crs, and sets new VPC ip with oifcfg. This should be noted, otherwise the method of modifying VPC by 10gR2 will cause the CRS cluster to fail to start up, so make a backup before you do it.

6. If the local_listener parameters of both nodes are not modified, the client will not be able to connect to the database. Report ERROR:ORA-12516: TNS: the listener cannot find an available handler that meets the requirements of the protocol stack. This is because scan_listener recognizes or modifies the vip.

[grid@p570b:/grid/app] $lsnrctl

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0-Production on 18-MAR-2010 14:19:15

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

LSNRCTL > set current listener_scan1

Current Listener is listener_scan1

LSNRCTL > services

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1)

Services Summary...

Service "gdcdc" has 2 instance (s).

Instance "gdcdc1", status READY, has 1 handler (s) for this service...

Handler (s):

"DEDICATED" established:1 refused:0 state:blocked

REMOTE SERVER

(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.128.12) (PORT=1521))

Instance "gdcdc2", status READY, has 1 handler (s) for this service...

Handler (s):

"DEDICATED" established:0 refused:0 state:ready

REMOTE SERVER

(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.128.13) (PORT=1521))

After modifying the local_listener parameter

[grid@p570a:/grid/app] $lsnrctl services listener_scan1

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0-Production on 19-MAR-2010 09:47:50

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

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER_SCAN1)

Services Summary...

Service "gdcdc" has 2 instance (s).

Instance "gdcdc1", status READY, has 1 handler (s) for this service...

Handler (s):

"DEDICATED" established:0 refused:0 state:ready

REMOTE SERVER

(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=10.76.31.113) (PORT=1521))

Instance "gdcdc2", status READY, has 1 handler (s) for this service...

Handler (s):

"DEDICATED" established:0 refused:0 state:ready

REMOTE SERVER

(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=10.76.31.115) (PORT=1521))

Thank you for reading this article carefully. I hope the article "how to modify the ip address of oracle 11gr2rac" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report