ORACLE RAC11G 更改IP地址

來源:互聯網
上載者:User

標籤:oracle11g   rac   手動更改   叢集ip地址

環境:oracle 11.2.0.4  rac 


修改前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的備份

[[email protected] bin]# ./ocrconfig -showbackup


2、備份OCR

[[email protected] bin]# ./ocrconfig -manualbackup


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



3、關閉資料庫

srvctl stop database -d db


4、在任意節點上修改:

這裡我是在節點1上面操作的

[[email protected] ~]# cd /u01/app/11.2.0/grid/bin/

[[email protected] bin]# ./oifcfg getif

eth0  192.168.2.0  global  public

eth1  200.100.100.0  global  cluster_interconnect


[[email protected] bin]# ./oifcfg delif -global eth0

[[email protected] bin]# ./oifcfg setif -global eth0/192.168.1.0:public

[[email protected] bin]# ./oifcfg getif

eth1  200.100.100.0  global  cluster_interconnect

eth0  192.168.1.0  global  public


[[email protected] bin]# ./oifcfg delif -global eth1

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

這裡不允許刪除最後一個私人介面,可以先添加一個私人介面再來刪除

[[email protected] bin]# ./oifcfg setif -global eth1/200.100.100.0:cluster_interconnect

[[email protected] bin]# ./oifcfg getif

eth1  100.100.100.0  global  cluster_interconnect

eth0  192.168.2.0  global  public

eth1  200.100.100.0  global  cluster_interconnect


[[email protected] bin]# ./oifcfg delif -global eth1/100.100.100.0:cluster_interconnect

[[email protected] bin]# ./oifcfg getif

eth0  192.168.2.0  global  public

eth1  200.100.100.0  global  cluster_interconnect

在某節點停止oracle高可能用性服務

[[email protected] bin]# ./crsctl stop cluster -all


5、修改IP地址及/etc/hosts檔案並測試


6、在所有節點重新啟動所有服務

[[email protected] bin]#./crsctl start cluster -all


7、停止scan_listener和scan

[[email protected] bin]#./srvctl stop scan_listener

[[email protected] bin]#./srvctl stop scan


8、刪除scan_listener和scan

[[email protected] bin]#./srvctl remove scan_listener -f

[[email protected] bin]#./srvctl remove scan -f

9、添加scan和scan_listener

[[email protected] bin]#./srvctl add scan -n db-scan -k 2 -S 192.168.1.0/255.255.255.0/eth0

說明:上面命令中-k 為1(network number)會報錯,因為之前已經被使用過

[[email protected] 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


[[email protected] bin]#./srvctl add scan_listener


10、啟動scan和scan_listener

[[email protected] bin]#./srvctl start scan

[[email protected] bin]#./srvctl start scan_listener


11、停止VIP資源

[[email protected] bin]# ./crsctl stop resource ora.db1.vip -f

[[email protected] bin]# ./crsctl stop resource ora.db2.vip -f

[[email protected] bin]# ./crsctl stop resource ora.db3.vip -f

這裡可以通過下面命令查看vip的狀態

[[email protected] 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地址

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

[[email protected] bin]# ./srvctl modify nodeapps -A 192.168.1.74/255.255.255.0/eth0 -n db2

[[email protected] bin]# ./srvctl modify nodeapps -A 192.168.1.77/255.255.255.0/eth0 -n db3



13、啟動VIP資源:

[[email protected] 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

[[email protected] 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

[[email protected] 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

啟動VIP資源後本地監聽就已經啟動了,下面第14步操作可以不執行


14、啟動本地監聽: 


[[email protected] bin]# ./srvctl start listener -n db1

[[email protected] bin]# ./srvctl start listener -n db2

[[email protected] bin]# ./srvctl start listener -n db3

問題:操作完成之後執行oifcfg getif,出現在下面的提示資訊

[[email protected] peer]$ oifcfg getif

eth0  192.168.1.0  global  public

eth1  100.100.100.0  global  cluster_interconnect

Only in OCR: eth1:  100.100.100.0  global  cluster_interconnect

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

說網路資訊在OCR與GPnP不一致,這裡重新設定一下即可

[[email protected] peer]$ oifcfg setif -global eth1/100.100.100.0:cluster_interconnect

[[email protected] peer]$ oifcfg getif

eth0  192.168.1.0  global  public

eth1  100.100.100.0  global  cluster_interconnect


本文出自 “西門慶他小叔” 部落格,請務必保留此出處http://718693.blog.51cto.com/708693/1610487

ORACLE RAC11G 更改IP地址

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.