ORACLERAC11G更改IP地址

環(huán)境:oracle 11.2.0.4  rac 

成都創(chuàng)新互聯(lián)從2013年創(chuàng)立,先為成華等服務(wù)建站,成華等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為成華企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。

修改前IP地址

# public ip

192.168.2.71 db1

192.168.2.72 db2

192.168.2.76 db3

#priv ip

200.100.100.11 db1-priv

200.100.100.12 db2-priv

200.100.100.13 db3-priv

#vip ip

192.168.2.73 db1-vip

192.168.2.74 db2-vip

192.168.2.77 db3-vip

#scan ip

192.168.2.75 db-scan

修改后IP地址

# public ip

192.168.1.71 db1

192.168.1.72 db2

192.168.1.76 db3

#priv ip

100.100.100.11 db1-priv

100.100.100.12 db2-priv

100.100.100.13 db3-priv

#vip ip

192.168.1.73 db1-vip

192.168.1.74 db2-vip

192.168.1.77 db3-vip

#scan ip

192.168.1.75 db-scan

1、查看ocr的備份

[root@db1 bin]# ./ocrconfig -showbackup

2、備份OCR

[root@db1 bin]# ./ocrconfig -manualbackup

db3     2015/01/29 19:58:22     /u01/app/11.2.0/grid/cdata/db-scan/backup_20150129_195822.ocr

3、關(guān)閉數(shù)據(jù)庫(kù)

srvctl stop database -d db

4、在任意節(jié)點(diǎn)上修改:

這里我是在節(jié)點(diǎn)1上面操作的

[root@db1 ~]# cd /u01/app/11.2.0/grid/bin/

[root@db1 bin]# ./oifcfg getif

eth0  192.168.2.0  global  public

eth2  200.100.100.0  global  cluster_interconnect

[root@db1 bin]# ./oifcfg delif -global eth0

[root@db1 bin]# ./oifcfg setif -global eth0/192.168.1.0:public

[root@db1 bin]# ./oifcfg getif

eth2  200.100.100.0  global  cluster_interconnect

eth0  192.168.1.0  global  public

[root@db1 bin]# ./oifcfg delif -global eth2

PRIF-31: Failed to delete the specified network interface because it is the last private interface

這里不允許刪除最后一個(gè)私有接口,可以先添加一個(gè)私有接口再來(lái)刪除

[root@db1 bin]# ./oifcfg setif -global eth2/200.100.100.0:cluster_interconnect

[root@db1 bin]# ./oifcfg getif

eth2  100.100.100.0  global  cluster_interconnect

eth0  192.168.2.0  global  public

eth2  200.100.100.0  global  cluster_interconnect

[root@db1 bin]# ./oifcfg delif -global eth2/100.100.100.0:cluster_interconnect

[root@db1 bin]# ./oifcfg getif

eth0  192.168.2.0  global  public

eth2  200.100.100.0  global  cluster_interconnect

在某節(jié)點(diǎn)停止oracle高可能用性服務(wù)

[root@db1 bin]# ./crsctl stop cluster -all

5、修改IP地址及/etc/hosts文件并測(cè)試

6、在所有節(jié)點(diǎn)重新啟動(dòng)所有服務(wù)

[root@db1 bin]#./crsctl start cluster -all

7、停止scan_listener和scan

[root@db1 bin]#./srvctl stop scan_listener

[root@db1 bin]#./srvctl stop scan

8、刪除scan_listener和scan

[root@db1 bin]#./srvctl remove scan_listener -f

[root@db1 bin]#./srvctl remove scan -f

9、添加scan和scan_listener

[root@db1 bin]#./srvctl add scan -n db-scan -k 2 -S 192.168.1.0/255.255.255.0/eth0

說(shuō)明:上面命令中-k 為1(network number)會(huì)報(bào)錯(cuò),因?yàn)橹耙呀?jīng)被使用過(guò)

[root@db1 bin]# ./srvctl config scan

SCAN name: db-scan, Network: 2/192.168.1.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /db-scan/192.168.1.75

[root@db1 bin]#./srvctl add scan_listener

10、啟動(dòng)scan和scan_listener

[root@db1 bin]#./srvctl start scan

[root@db1 bin]#./srvctl start scan_listener

11、停止VIP資源

[root@db1 bin]# ./crsctl stop resource ora.db1.vip -f

[root@db1 bin]# ./crsctl stop resource ora.db2.vip -f

[root@db1 bin]# ./crsctl stop resource ora.db3.vip -f

這里可以通過(guò)下面命令查看vip的狀態(tài)

[root@db1 bin]# ./crsctl stat res -t

ora.db1.vip

      1        OFFLINE OFFLINE                                                   

ora.db2.vip

      1        OFFLINE OFFLINE                                                   

ora.db3.vip

      1        OFFLINE OFFLINE 

12、修改vip地址

[root@db1 bin]# ./srvctl modify nodeapps -A 192.168.1.73/255.255.255.0/eth0 -n db1

[root@db1 bin]# ./srvctl modify nodeapps -A 192.168.1.74/255.255.255.0/eth0 -n db2

[root@db1 bin]# ./srvctl modify nodeapps -A 192.168.1.77/255.255.255.0/eth0 -n db3

13、啟動(dòng)VIP資源:

[root@db1 bin]# ./crsctl start resource ora.db1.vip -f

CRS-2672: Attempting to start 'ora.db1.vip' on 'db1'

CRS-2676: Start of 'ora.db1.vip' on 'db1' succeeded

[root@db1 bin]# ./crsctl start resource ora.db2.vip -f

CRS-2672: Attempting to start 'ora.db2.vip' on 'db2'

CRS-2676: Start of 'ora.db2.vip' on 'db2' succeeded

[root@db1 bin]# ./crsctl start resource ora.db3.vip -f

CRS-2672: Attempting to start 'ora.db3.vip' on 'db3'

CRS-2676: Start of 'ora.db3.vip' on 'db3' succeeded

啟動(dòng)VIP資源后本地監(jiān)聽(tīng)就已經(jīng)啟動(dòng)了,下面第14步操作可以不執(zhí)行

14、啟動(dòng)本地監(jiān)聽(tīng): 

[root@db1 bin]# ./srvctl start listener -n db1

[root@db1 bin]# ./srvctl start listener -n db2

[root@db1 bin]# ./srvctl start listener -n db3

問(wèn)題:操作完成之后執(zhí)行oifcfg getif,出現(xiàn)在下面的提示信息

[grid@db1 peer]$ oifcfg getif

eth0  192.168.1.0  global  public

eth2  100.100.100.0  global  cluster_interconnect

Only in OCR: eth2:  100.100.100.0  global  cluster_interconnect

PRIF-30: Network information in OCR and GPnP profile differs

說(shuō)網(wǎng)絡(luò)信息在OCR與GPnP不一致,這里重新配置一下即可

[grid@db1 peer]$ oifcfg setif -global eth2/100.100.100.0:cluster_interconnect

[grid@db1 peer]$ oifcfg getif

eth0  192.168.1.0  global  public

eth2  100.100.100.0  global  cluster_interconnect

分享文章:ORACLERAC11G更改IP地址
本文路徑:http://muchs.cn/article40/ihideo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供全網(wǎng)營(yíng)銷推廣、定制網(wǎng)站、App開(kāi)發(fā)、微信公眾號(hào)、網(wǎng)站營(yíng)銷、品牌網(wǎng)站設(shè)計(jì)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運(yùn)營(yíng)