RAC 增加SCAN IP

lhrbest發表於2018-06-05

RAC 增加SCAN IP






對新配置的oracle RAC環境增配2SCAN IP地址,192.168.59.175以及192.168.59.176

1.1.1.1     配置前資訊

預設情況下配置RA 只有1scan IP1 scan listener

 

檢視scan的配置資訊

[root@raclhr-11gR2-N1 ~]# cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

 

#Public IP

192.168.59.170            raclhr-11gR2-N1

192.168.59.171            raclhr-11gR2-N2

 

#Private IP

192.168.2.110             raclhr-11gR2-N1-priv

192.168.2.111             raclhr-11gR2-N2-priv

 

#Virtual IP

192.168.59.172            raclhr-11gR2-N1-vip

192.168.59.173            raclhr-11gR2-N2-vip

 

#Scan IP

192.168.59.174            raclhr-11gR2-scan

[root@raclhr-11gR2-N1 ~]# srvctl config scan

SCAN name: raclhr-11gR2-scan, Network: 1/192.168.59.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /raclhr-11gR2-scan/192.168.59.174

檢視scan的狀態以及scan ip所處節點

[root@raclhr-11gR2-N1 ~]# srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node raclhr-11gr2-n2

[root@raclhr-11gR2-N1 ~]#

 

檢視scan listener

[root@raclhr-11gR2-N1 ~]# srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521

[root@raclhr-11gR2-N1 ~]#

 

1.1.1.2     修改rac所有節點的/etc/hosts資訊

[root@raclhr-11gR2-N1 ~]# cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

 

#Public IP

192.168.59.170            raclhr-11gR2-N1

192.168.59.171            raclhr-11gR2-N2

 

#Private IP

192.168.2.110             raclhr-11gR2-N1-priv

192.168.2.111             raclhr-11gR2-N2-priv

 

#Virtual IP

192.168.59.172            raclhr-11gR2-N1-vip

192.168.59.173            raclhr-11gR2-N2-vip

 

#Scan IP

192.168.59.174            raclhr-11gR2-scan 

192.168.59.175            raclhr-11gR2-scan ----->>>>新增的SCAN IP

192.168.59.176            raclhr-11gR2-scan ----->>>>新增的SCAN IP

 

1.1.1.3     停止scan 監聽,注意先停監聽才能停scan

srvctl stop scan_listener

srvctl stop scan

srvctl status scan_listener

srvctl status scan

 

 

1.1.1.4     配置scan,注意需要用root許可權執行

修改scan資訊,-n 後面接 hosts中的san ip 網路名:

srvctl modify scan -n raclhr-11gR2-scan

 

[root@raclhr-11gR2-N1 ~]# srvctl modify scan -h

 

Modifies the SCAN name.

 

Usage: srvctl modify scan -n

    -n            Domain name qualified SCAN name

    -h                       Print usage

[root@raclhr-11gR2-N1 ~]#

[root@raclhr-11gR2-N1 ~]# srvctl modify scan -n raclhr-11gR2-scan

 

 

 

新增scanIP的監聽,若不執行該命令,將只有一個listener_scan1監聽,執行後將根據scan ip數自動增加listener_scan2listener_scan3.

srvctl modify scan_listener -u

 

[root@raclhr-11gR2-N1 ~]# srvctl modify scan_listener -h

 

Modifies the SCAN listeners so that the number of SCAN listeners is the same as the number of SCAN VIPs or modifies the SCAN listener endpoints.

 

Usage: srvctl modify scan_listener {-u|-p [TCP:][/IPC:][/NMP:][/TCPS:] [/SDP:]}

    -u                       Update SCAN listeners to match the number of SCAN VIPs

    -p [TCP:][/IPC:][/NMP:][/TCPS:] [/SDP:]           SCAN Listener endpoints

    -h                       Print usage

[root@raclhr-11gR2-N1 ~]# srvctl modify scan_listener -u

[root@raclhr-11gR2-N1 ~]#

[root@raclhr-11gR2-N1 ~]# crsctl stat res -t

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

NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

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

Local Resources

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

........

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

      1        OFFLINE OFFLINE                                                   

ora.LISTENER_SCAN2.lsnr

      1        OFFLINE OFFLINE                                                  

ora.LISTENER_SCAN3.lsnr

      1        OFFLINE OFFLINE                                                  

ora.cvu

      1        ONLINE  ONLINE       raclhr-11gr2-n1                             

ora.lhrrac1.db

      1        ONLINE  ONLINE       raclhr-11gr2-n1          Open               

      2        ONLINE  ONLINE       raclhr-11gr2-n2          Open                

ora.oc4j

      1        ONLINE  ONLINE       raclhr-11gr2-n1                             

ora.raclhr-11gr2-n1.vip

      1        ONLINE  ONLINE       raclhr-11gr2-n1                             

ora.raclhr-11gr2-n2.vip

      1        ONLINE  ONLINE       raclhr-11gr2-n2                             

ora.scan1.vip

      1        OFFLINE OFFLINE                                                  

ora.scan2.vip

      1        OFFLINE OFFLINE                                                  

ora.scan3.vip

      1        OFFLINE OFFLINE       

 

1.1.1.5     啟動scan

srvctl start scan

srvctl start scan_listener

srvctl status scan

srvctl status scan_listener

srvctl config scan

 

[root@raclhr-11gR2-N1 ~]# srvctl start scan

[root@raclhr-11gR2-N1 ~]# srvctl start scan_listener

[root@raclhr-11gR2-N1 ~]# srvctl status scan

SCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node raclhr-11gr2-n2

SCAN VIP scan2 is enabled

SCAN VIP scan2 is running on node raclhr-11gr2-n1

SCAN VIP scan3 is enabled

SCAN VIP scan3 is running on node raclhr-11gr2-n1

[root@raclhr-11gR2-N1 ~]# srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled

SCAN listener LISTENER_SCAN1 is running on node raclhr-11gr2-n2

SCAN Listener LISTENER_SCAN2 is enabled

SCAN listener LISTENER_SCAN2 is running on node raclhr-11gr2-n1

SCAN Listener LISTENER_SCAN3 is enabled

SCAN listener LISTENER_SCAN3 is running on node raclhr-11gr2-n1

[root@raclhr-11gR2-N1 ~]#

[root@raclhr-11gR2-N1 ~]# srvctl config scan

SCAN name: raclhr-11gR2-scan, Network: 1/192.168.59.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /raclhr-11gR2-scan/192.168.59.174

SCAN VIP name: scan2, IP: /raclhr-11gR2-scan/192.168.59.175

SCAN VIP name: scan3, IP: /raclhr-11gR2-scan/192.168.59.176

[root@raclhr-11gR2-N1 ~]#

 

1.1.1.6     檢視SCAN1SCAN2的內容

重啟叢集環境後,可以看到如下內容:

 

[root@raclhr-11gR2-N1 admin]# lsnrctl status listener_scan3

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUN-2018 15:24:13

 

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

 

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

STATUS of the LISTENER

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

Alias                     LISTENER_SCAN3

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                05-JUN-2018 15:18:55

Uptime                    0 days 0 hr. 5 min. 18 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/raclhr-11gR2-N1/listener_scan3/alert/log.xml

Listening Endpoints Summary...

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

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

Services Summary...

Service "+ASM" has 2 instance(s).

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

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

Service "lhrrac1" has 2 instance(s).

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

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

Service "lhrrac1XDB" has 2 instance(s).

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

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

Service "lhrxxt" has 2 instance(s).

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

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

The command completed successfully

[root@raclhr-11gR2-N1 admin]# lsnrctl status listener_scan2

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUN-2018 15:24:16

 

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

 

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

STATUS of the LISTENER

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

Alias                     LISTENER_SCAN2

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                05-JUN-2018 15:18:55

Uptime                    0 days 0 hr. 5 min. 21 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/raclhr-11gR2-N1/listener_scan2/alert/log.xml

Listening Endpoints Summary...

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

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

Services Summary...

Service "+ASM" has 2 instance(s).

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

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

Service "lhrrac1" has 2 instance(s).

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

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

Service "lhrrac1XDB" has 2 instance(s).

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

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

Service "lhrxxt" has 2 instance(s).

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

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

The command completed successfully

[root@raclhr-11gR2-N1 admin]#

 












小麥苗課程

小麥苗課堂開課啦,如下是現有的課程,歡迎諮詢小麥苗:


課程名稱

課時

上課時間(可根據情況調整)

價格

OCP(從入門到專家)

每年1期,35課時左右/

每週一、週三、週四、週六

20:00-22:00

1600

OCM認證

每年N期,9課時/

每週二、週五

20:00-22:00

23000

高可用課程(rac+dg+ogg)

每年1期,20課時左右/

每週一、週三、週四、週六

20:00-22:00

2000

Oracle初級入門

每年1期,15課時左右/

每週一、週三、週四、週六

20:00-22:00

800

Oracle健康檢查指令碼

可微信或微店購買。

100

Oracle資料庫技能直通車

包含如下3個課程:

①《11g OCP網路課程培訓》(面向零基礎) 價值1600

②《11g OCM網路班課程培訓》(Oracle技能合集)價值10000+

③《RAC + DG + OGG 高可用網路班課程》 價值2000

以上3個課程全部打包只要5888,只要5888所有課程帶回家,終身指導!所有課程都是線上講課,不是播放視訊,課件全部贈送!

注意:以上OCP和OCM課程只包括培訓課程,不包括考試費用。

5888

注意:

1、每次上課前30分鐘答疑。

2、OCM實時答疑,提供和考試一樣的練習模擬環境,只要按照老師講的方式來練習,可以保證100%通過。

3、授課方式:YY語音網路直播講課(非視訊) + QQ互動答疑 + 視訊複習。其中,OCM在上海開設現場班。

4、OCP課時可以根據大家學習情況進行增加或縮減。

5、以上所有課程均可迴圈聽課。

6、12c OCM課程私聊。

7、Oracle初級入門課程,只教大家最實用+最常用的Oracle操作維護知識。

8、以上所有課程,可以加小麥苗微信(lhrbestxh)或QQ(646634621)詳聊,優惠多多。
 


培訓專案

連線地址

DB筆試面試歷史連線

http://mp.weixin.qq.com/s/Vm5PqNcDcITkOr9cQg6T7w

OCP培訓說明連線

https://mp.weixin.qq.com/s/2cymJ4xiBPtTaHu16HkiuA

OCM培訓說明連線

https://mp.weixin.qq.com/s/7-R6Cz8RcJKduVv6YlAxJA

高可用(RAC+DG+OGG)培訓說明連線

https://mp.weixin.qq.com/s/4vf042CnOdAD8zDyjUueiw

OCP最新題庫解析歷史連線(052)

http://mp.weixin.qq.com/s/bUgn4-uciSndji_pUbLZfA

微店地址

https://weidian.com/s/793741433?wfr=c&ifr=shopdetail


● 網名:小麥苗

● QQ:646634621

● QQ群:618766405

● 我的部落格:http://blog.itpub.net/26736162/abstract/1/

● 微信公眾號:xiaomaimiaolhr,二維碼如下:

wps9E88.tmp 

● 小麥苗的微信二維碼如下所示,加我時請備註相關資訊:

wps9E89.tmp 

● 我的微店地址:https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

● 出版的資料庫類叢書:http://blog.itpub.net/26736162/viewspace-2142121/

● 部落格連結:http://blog.itpub.net/26736162/abstract/1/

● 小麥苗課堂資料(視訊+講課資料):https://share.weiyun.com/5fAdN5m



 


 

7、Oracle初級入門課程,只教大家最實用+最常用的Oracle操作維護知識。





About Me

.............................................................................................................................................

● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除

● 本文在itpub(http://blog.itpub.net/26736162/abstract/1/)、部落格園(http://www.cnblogs.com/lhrbest)和個人微信公眾號(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162/abstract/1/

● 本文部落格園地址:http://www.cnblogs.com/lhrbest

● 本文pdf版、個人簡介及小麥苗雲盤地址:http://blog.itpub.net/26736162/viewspace-1624453/

● 資料庫筆試面試題庫及解答:http://blog.itpub.net/26736162/viewspace-2134706/

● DBA寶典今日頭條號地址:http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

.............................................................................................................................................

● QQ群號:230161599(滿)、618766405

● 微信群:可加我微信,我拉大家進群,非誠勿擾

● 聯絡我請加QQ好友646634621,註明新增緣由

● 於 2018-06-01 06:00 ~ 2018-06-31 24:00 在魔都完成

● 最新修改時間:2018-06-01 06:00 ~ 2018-06-31 24:00

● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解

● 版權所有,歡迎分享本文,轉載請保留出處

.............................................................................................................................................

小麥苗的微店https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麥苗出版的資料庫類叢書http://blog.itpub.net/26736162/viewspace-2142121/

小麥苗OCP、OCM、高可用網路班http://blog.itpub.net/26736162/viewspace-2148098/

.............................................................................................................................................

使用微信客戶端掃描下面的二維碼來關注小麥苗的微信公眾號(xiaomaimiaolhr)及QQ群(DBA寶典),學習最實用的資料庫技術。

小麥苗的微信公眾號小麥苗的DBA寶典QQ群2《DBA筆試面寶典》讀者群小麥苗的微店

   小麥苗的微信公眾號      小麥苗的DBA寶典QQ群2     《DBA筆試面試寶典》讀者群       小麥苗的微店

.............................................................................................................................................

RAC 增加SCAN IP
DBA筆試面試講解群
《DBA寶典》讀者群 歡迎與我聯絡



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2155652/,如需轉載,請註明出處,否則將追究法律責任。

相關文章