天天看點

11Gr2 RAC 修改scan IP

11Gr2環境需要更改scan ip, 基本的原理就是更改DNS或者hosts檔案内的IP位址,然後通過srvctl 指令去同步CRS内的資訊,完成scan ip的修改。

Before, need modify all the node /etc/hosts,  set the new ip address.

1.

Stop the SCAN listener and the SCAN VIP resources:

2.需要先停止服務,測試時候由于沒有停止服務,最後出現scan listener沒有啟動,後手動啟動,同時parameter remote_listener值丢失,重新設定的。

# $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.

# To check the current IP address(es) of the SCAN VIPs, run the following commands as the root user:

$GRID_HOME/bin/srvctl config scan

SCAN name: qr01-scan, Network: 1/192.0.2.0/255.255.255.0/eth0 

SCAN VIP name: scan1, IP: /qr01-scan.example.com/192.0.2.21 

4.

# Next refresh the SCAN VIPs with the new IP addresses from the DNS entry:

$GRID_HOME/bin/srvctl modify scan -n <scan_name>

5.

# To check if the SCAN VIPs have been changed, run the following command, it should now show the new IP addresses.

SCAN VIP name: scan1, IP: /qr01-scan.example.com/192.0.2.31 

6.

Start SCAN and the SCAN listener:

# $GRID_HOME/bin/srvctl start scan

# $GRID_HOME/bin/srvctl start scan_listener

7.

check parameter

SQL> show parameter remote

NAME                                 TYPE        VALUE 

------------------------------------ ----------- ------------------------------ 

remote_listener                      string      qr01-scan:1521 

8.

check listener status

$ps -ef|grep tns

oracle    4992     1  0 16:12 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit 

oracle    5004     1  0 16:12 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit 

oracle    9816  5529  0 17:45 pts/0    00:00:00 grep tns 

需要到grid使用者下執行下面指令

$lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 07-MAY-2012 17:46:25 

Copyright (c) 1991, 2010, 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 11.2.0.2.0 - Production 

Start Date                07-MAY-2012 12:12:11 

Uptime                    0 days 1 hr. 34 min. 14 sec 

Trace Level               off 

Security                  ON: Local OS Authentication 

SNMP                      OFF 

Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora 

Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/qr01db02/listener_scan1/alert/log.xml 

Listening Endpoints Summary... 

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1))) 

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.0.2.31)(PORT=1521))) 

Services Summary... 

Service "dbm.example.com" has 2 instance(s). 

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

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

Service "dbmXDB.example.com" has 2 instance(s). 

The command completed successfully 

本文轉自 hsbxxl 51CTO部落格,原文連結:http://blog.51cto.com/hsbxxl/856190,如需轉載請自行聯系原作者

繼續閱讀