Geçenlerde test ortamda yapılandırdığım Oracle11gR2 grid yapılandırması aşağıdaki loglarda görüldüğü gibi sadece tek bir SCAN listener ile tamamlandı. Oracle 11.2 RAC yapılandırması iki düğümden(rac01 ve rac02) oluşan bir test platformunda yapıldı. Bu yazıda Oracle 11.2 Grid ortamında RAC düğümlere nasıl ilave iki SCAN listener daha eklenecek, onu inceleyeceğiz.
[grid@rac01 grid]$ srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.38.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.192
SCAN name: rac-scan, Network: 1/192.168.38.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.192
[grid@rac01 grid]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
[grid@rac01 grid]$ ping rac-scan.bugra.com
PING rac-scan.bugra.com(192.168.67.193) 56(84) bytes of data.
From rac01.test.ant(192.168.38.50) icmp_seq=2 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=3 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=4 Destination Host Unreachable
PING rac-scan.bugra.com(192.168.67.193) 56(84) bytes of data.
From rac01.test.ant(192.168.38.50) icmp_seq=2 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=3 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=4 Destination Host Unreachable
— rac-scan.bugra.com ping istatistikleri —
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5000ms
, pipe 3
[grid@rac01 grid]$ ping rac-scan
PING rac-scan.bugra.com(192.168.67.194) 56(84) bytes of data.
From rac01.test.ant(192.168.38.50) icmp_seq=2 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=3 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=4 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=6 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=7 Destination Host Unreachable
From rac01.test.ant(192.168.38.50) icmp_seq=8 Destination Host Unreachable
-- rac-scan.bugra.com ping istatistikleri –
11 packets transmitted, 0 received, +6 errors, 100% packet loss, time 10000ms
, pipe 3
[grid@rac01 grid]$ ping rac-scan
PING rac-scan.bugra.com(192.168.67.192) 56(84) bytes of data.
64 bytes from rac-scan.bugra.com(192.168.67.192): icmp_seq=1 ttl=64 time=0.039 ms
64 bytes from rac-scan.bugra.com(192.168.67.192): icmp_seq=2 ttl=64 time=0.054 ms
64 bytes from rac-scan.bugra.com(192.168.67.192): icmp_seq=3 ttl=64 time=0.049 ms
64 bytes from rac-scan.bugra.com(192.168.67.192): icmp_seq=4 ttl=64 time=0.063 ms
-- rac-scan.bugra.com ping istatistikleri –
4 packets transmitted, 4 received, 0% packet loss, time 3001ms
rtt min/avg/max/mdev = 0.039/0.051/0.063/0.010 ms
[grid@rac01 grid]$ host rac-scan
rac-scan.bugra.com address 192.168.67.194
rac-scan.bugra.com address 192.168.67.193
rac-scan.bugra.com address 192.168.67.192
rac-scan.bugra.com address 192.168.67.194
rac-scan.bugra.com address 192.168.67.193
rac-scan.bugra.com address 192.168.67.192
[grid@rac01 grid]$ nslookup rac-scan
Server: 192.168.5.53
Address: 192.168.5.53#53
Server: 192.168.5.53
Address: 192.168.5.53#53
Name: rac-scan.bugra.com
Address: 192.168.67.194
Name: rac-scan.bugra.com
Address: 192.168.67.192
Name: rac-scan.bugra.com
Address: 192.168.67.193
Address: 192.168.67.194
Name: rac-scan.bugra.com
Address: 192.168.67.192
Name: rac-scan.bugra.com
Address: 192.168.67.193
[root@rac01 network-scripts]# host rac-scan
rac-scan.bugra.com address 192.168.67.194
rac-scan.bugra.com address 192.168.67.193
rac-scan.bugra.com address 192.168.67.192
rac-scan.bugra.com address 192.168.67.194
rac-scan.bugra.com address 192.168.67.193
rac-scan.bugra.com address 192.168.67.192
[root@rac01 network-scripts]#
rac-scan.bugra.com IN A 192.168.67.194
IN A 192.168.67.193
IN A 192.168.67.192
IN A 192.168.67.193
IN A 192.168.67.192
[grid@rac02 grid]$ Check_CRS.txt
HA Resource Target State
----------------------- ------- ---------------
ora.CRS.dg ONLINE ONLINE on rac01
ora.FRA.dg ONLINE ONLINE on rac01
ora.LISTENER.lsnr ONLINE ONLINE on rac01
ora.LISTENER_SCAN1.lsnr ONLINE ONLINE on rac01
ora.TESTDB_DATA.dg ONLINE ONLINE on rac01
ora.asm ONLINE ONLINE on rac01
ora.eons ONLINE ONLINE on rac01
ora.gsd OFFLINE OFFLINE
ora.net1.network ONLINE ONLINE on rac01
ora.oc4j OFFLINE OFFLINE
ora.ons ONLINE ONLINE on rac01
…
…
ora.rac02.vip ONLINE ONLINE on rac02
ora.rac10g.db ONLINE ONLINE on rac02
ora.rac11g.rac11g1.inst ONLINE ONLINE on rac01
ora.rac11g.rac11g2.inst ONLINE OFFLINE
ora.racpoc.askm1.svc ONLINE ONLINE on rac01
ora.racpoc.db ONLINE ONLINE on rac01
ora.registry.acfs ONLINE ONLINE on rac01
ora.scan1.vip ONLINE ONLINE on rac01
ora.testdb.db ONLINE ONLINE on rac01
ora.CRS.dg ONLINE ONLINE on rac01
ora.FRA.dg ONLINE ONLINE on rac01
ora.LISTENER.lsnr ONLINE ONLINE on rac01
ora.LISTENER_SCAN1.lsnr ONLINE ONLINE on rac01
ora.TESTDB_DATA.dg ONLINE ONLINE on rac01
ora.asm ONLINE ONLINE on rac01
ora.eons ONLINE ONLINE on rac01
ora.gsd OFFLINE OFFLINE
ora.net1.network ONLINE ONLINE on rac01
ora.oc4j OFFLINE OFFLINE
ora.ons ONLINE ONLINE on rac01
…
…
ora.rac02.vip ONLINE ONLINE on rac02
ora.rac10g.db ONLINE ONLINE on rac02
ora.rac11g.rac11g1.inst ONLINE ONLINE on rac01
ora.rac11g.rac11g2.inst ONLINE OFFLINE
ora.racpoc.askm1.svc ONLINE ONLINE on rac01
ora.racpoc.db ONLINE ONLINE on rac01
ora.registry.acfs ONLINE ONLINE on rac01
ora.scan1.vip ONLINE ONLINE on rac01
ora.testdb.db ONLINE ONLINE on rac01
tnsnames.ora dosyası :
TESTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.bugra.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb.bugra.com)
)
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.bugra.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb.bugra.com)
)
)
Yukardaki oturum verisi açıkça tek bir SCAN listener yapılandırıldığını göstermektedir. SCAN ismi tnsnames.ora dosyası içinde kullanıldığında, istemci bağlantılarının veritabanına sağlanması SCAN ismi geçerli bir IP adresine çevrildiğinde mümkün olacaktır.
Ancak, yukardaki konfigürasyonlarda istemci bağlatıları SCAN adının 192.168.67.193 veya 192.168.67.194 ip adreslerine çevrilmesi esnasında hata verebielecektir.SCAN, istemci bağlantılarını sadece 192.168.67.192 IP adresine çevrildiği durumlarda sağlayacaktır.
SQL> conn test/test@testdb ==> Bağlantı hatası verir. rac-scan ya 192.168.67.193 yada 192.168.67.194 adresine çevirir.
ERROR:
ORA-12543: TNS:destination host unreachable
SQL>conn test/test@testdb ==>Bağlantı sağlanır. rac-scan 192.168.67.192’ye çevirir.
connected
connected
Bu sorunun üstesinden gelmek için aşağıda görüldüğü üzere iki adet SCAN listener daha oluşturulmalıdır.
[grid@rac01 grid]$ srvctl stop scan_listener
[grid@rac01 grid]$ srvctl stop scan
[grid@rac01 grid]$ srvctl config scan
[grid@rac01 grid]$ srvctl stop scan
[grid@rac01 grid]$ srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.38.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.192
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.192
[grid@rac01 grid]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
[grid@rac01 grid]$ which srvctl
/u01/home/11.2.0/grid/bin/srvctl
/u01/home/11.2.0/grid/bin/srvctl
[grid@rac01 grid]$
[root@rac01 network-scripts]# /u01/home/11.2.0/grid/bin/srvctl modify scan -h
Modifies the SCAN name.
Usage: srvctl modify scan -n <scan_name>
-n <scan_name> Domain name qualified SCAN name
-h Print usage
-n <scan_name> Domain name qualified SCAN name
-h Print usage
[root@rac01 network-scripts]# /u01/home/11.2.0/grid/bin/srvctl modify scan -n rac-scan
[root@rac01 network-scripts]# /u01/home/11.2.0/grid/bin/srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.38.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.193
SCAN VIP name: scan2, IP: /rac-scan.bugra.com/192.168.67.194
SCAN VIP name: scan3, IP: /rac-scan.bugra.com/192.168.67.192
SCAN name: rac-scan, Network: 1/192.168.38.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.193
SCAN VIP name: scan2, IP: /rac-scan.bugra.com/192.168.67.194
SCAN VIP name: scan3, IP: /rac-scan.bugra.com/192.168.67.192
[root@rac01 network-scripts]# /u01/home/11.2.0/grid/bin/srvctl modify scan_listener -u
[root@rac01 network-scripts]# /u01/home/11.2.0/grid/bin/srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[root@rac01 network-scripts]# /u01/home/11.2.0/grid/bin/srvctl start scan_listener
[root@rac01 network-scripts]# /u01/home/11.2.0/grid/bin/srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.38.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.193
SCAN VIP name: scan2, IP: /rac-scan.bugra.com/192.168.67.194
SCAN VIP name: scan3, IP: /rac-scan.bugra.com/192.168.67.192
SCAN name: rac-scan, Network: 1/192.168.38.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /rac-scan.bugra.com/192.168.67.193
SCAN VIP name: scan2, IP: /rac-scan.bugra.com/192.168.67.194
SCAN VIP name: scan3, IP: /rac-scan.bugra.com/192.168.67.192
[grid@rac02 grid]$ Check_CRS.txt
HA Resource Target State
---------------------- ----- ----------------
ora.CRS.dg ONLINE ONLINE on rac01
ora.FRA.dg ONLINE ONLINE on rac01
ora.LISTENER.lsnr ONLINE ONLINE on rac01
ora.LISTENER_SCAN1.lsnr ONLINE ONLINE on rac01
ora.LISTENER_SCAN2.lsnr ONLINE ONLINE on rac02
ora.LISTENER_SCAN3.lsnr ONLINE ONLINE on rac02
ora.RACDB_DATA.dg ONLINE ONLINE on rac01
ora.asm ONLINE ONLINE on rac01
ora.eons ONLINE ONLINE on rac01
ora.gsd OFFLINE OFFLINE
ora.net1.network ONLINE ONLINE on rac01
ora.oc4j OFFLINE OFFLINE
ora.ons ONLINE ONLINE on rac01
…
…
ora.rac02.vip ONLINE ONLINE on rac02
ora.rac11g.db ONLINE ONLINE on rac02
ora.rac11g.rac11g1.inst ONLINE ONLINE on rac01
ora.rac10g.rac11g2.inst ONLINE OFFLINE
ora.racpoc.askm1.svc ONLINE ONLINE on rac01
ora.racpoc.db ONLINE ONLINE on rac01
ora.registry.acfs ONLINE ONLINE on rac01
ora.scan1.vip ONLINE ONLINE on rac01
ora.scan2.vip ONLINE ONLINE on rac02
ora.scan3.vip ONLINE ONLINE on rac02
ora.testdb.db ONLINE ONLINE on rac01
HA Resource Target State
---------------------- ----- ----------------
ora.CRS.dg ONLINE ONLINE on rac01
ora.FRA.dg ONLINE ONLINE on rac01
ora.LISTENER.lsnr ONLINE ONLINE on rac01
ora.LISTENER_SCAN1.lsnr ONLINE ONLINE on rac01
ora.LISTENER_SCAN2.lsnr ONLINE ONLINE on rac02
ora.LISTENER_SCAN3.lsnr ONLINE ONLINE on rac02
ora.RACDB_DATA.dg ONLINE ONLINE on rac01
ora.asm ONLINE ONLINE on rac01
ora.eons ONLINE ONLINE on rac01
ora.gsd OFFLINE OFFLINE
ora.net1.network ONLINE ONLINE on rac01
ora.oc4j OFFLINE OFFLINE
ora.ons ONLINE ONLINE on rac01
…
…
ora.rac02.vip ONLINE ONLINE on rac02
ora.rac11g.db ONLINE ONLINE on rac02
ora.rac11g.rac11g1.inst ONLINE ONLINE on rac01
ora.rac10g.rac11g2.inst ONLINE OFFLINE
ora.racpoc.askm1.svc ONLINE ONLINE on rac01
ora.racpoc.db ONLINE ONLINE on rac01
ora.registry.acfs ONLINE ONLINE on rac01
ora.scan1.vip ONLINE ONLINE on rac01
ora.scan2.vip ONLINE ONLINE on rac02
ora.scan3.vip ONLINE ONLINE on rac02
ora.testdb.db ONLINE ONLINE on rac01
RAC düğümlerde aktif SCAN listenerların durumlarını öğrenmek;
[grid@rac01 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac01
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac02
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac02
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac01
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac02
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac02
[grid@rac01 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac01
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac02
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac02
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac01
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac02
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac02
0 yorum:
Yorum Gönder