OS환경 : Oracle Linux 6.8 (64bit)
DB 환경 : Oracle Database 11.2.0.4 RAC
방법 : 오라클 11g R2 스캔 리스너 제거 및 상태 확인(scan listener remove)
Scan(Single Client Access Name) 이란?
여러 DB서버(노드)로 구성된 Oracle RAC 환경에서 단일 인터페이스를 제공하기 위한 것
즉, 사용자는 DB서버가 물리적으로 4개 서버로 구성되었는지, 6개 서버로 구성되었는지 알 필요가 없음
Scan 리스너를 통해서 접속하면 알아서 적당한 DB서버로 붙을 수 있게 해주기 위한 기능임
클라이언트 접속 시에 load-balacing과 fail-over를 지원함
scan 리스너 제거
scan 리스너 상태 확인(lsnrctl)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # lsnrctl status LISTENER_SCAN1 LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 02-JUL-2020 22:02:20 Copyright (c) 1991, 2013, 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.4.0 - Production Start Date 02-JUL-2020 08:48:48 Uptime 0 days 0 hr. 13 min. 31 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /app/grid/product/11.2.0/grid/network/admin/listener.ora Listener Log File /app/grid/product/11.2.0/grid/log/diag/tnslsnr/rac2/listener_scan1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.137.55)(PORT=1521))) The listener supports no services The command completed successfully |
scan 리스너 및 scan 상태 확인(srvctl)
1 2 3 4 5 6 7 | # srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is running on node rac2 # srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node rac2 |
scan 구성 확인
1 2 3 | # srvctl config scan SCAN name: rac-scan, Network: 1/192.168.137.0/255.255.255.0/ens33 SCAN VIP name: scan1, IP: /rac-scan/192.168.137.55 |
scan 리스너 상태 확인(crsctl)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.OCR_VOTE.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORADATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORAFRA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac2 ora.cvu 1 ONLINE ONLINE rac1 ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.racdb.db 1 OFFLINE OFFLINE Instance Shutdown 2 OFFLINE OFFLINE Instance Shutdown ora.scan1.vip 1 ONLINE ONLINE rac2 |
srvctl 시 scan_listener과 scan
ora.LISTENER_SCAN1.lsnr 이 scan_listener이고
scan 리스너 중지 및 확인
1 2 3 4 5 6 7 8 | # srvctl stop scan_listener # srvctl stop scan # srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is not running # srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is not running |
scan 먼저 중지 시 에러메세지
1 2 3 | # srvctl stop scan PRCR-1065 : Failed to stop resource ora.scan1.vip CRS-2529: Unable to act on 'ora.scan1.vip' because that would require stopping or relocating 'ora.LISTENER_SCAN1.lsnr', but the force option was not specified |
scan 리스너 상태 확인(crsctl)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.OCR_VOTE.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORADATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORAFRA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 OFFLINE OFFLINE ora.cvu 1 ONLINE ONLINE rac1 ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.racdb.db 1 OFFLINE OFFLINE Instance Shutdown 2 OFFLINE OFFLINE Instance Shutdown ora.scan1.vip 1 OFFLINE OFFLINE |
srvctl stop scan_listener 명령만 사용 했 을 때는 ora.scan1.vip 은 계속 ONLINE 상태로 있고
ora.LISTENER_SCAN1.lsnr 만 OFFLINE 로 변경됨
scan 리스너 제거 및 확인(ora.LISTENER_SCAN1.lsnr)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # srvctl remove scan_listener Remove scan listener? (y/[n]) y # crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.OCR_VOTE.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORADATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORAFRA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cvu 1 ONLINE ONLINE rac1 ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.racdb.db 1 OFFLINE OFFLINE Instance Shutdown 2 OFFLINE OFFLINE Instance Shutdown ora.scan1.vip 1 OFFLINE OFFLINE |
ora.LISTENER_SCAN1.lsnr 리소스가 없어짐
scan 제거 및 확인(ora.scan1.vip)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # srvctl remove scan Remove the scan? (y/[n]) y # crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.OCR_VOTE.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORADATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORAFRA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.cvu 1 ONLINE ONLINE rac1 ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.racdb.db 1 OFFLINE OFFLINE Instance Shutdown 2 OFFLINE OFFLINE Instance Shutdown |
ora.scan1.vip 리소스가 없어짐
정상적으로 제거됨
scan 리스너 제거 후 확인(srvctl)
1 2 3 4 | # srvctl status scan PRCS-1025 : Could not find Single Client Access Name Virtual Internet Protocol(VIP) resources TYPE=ora.scan_vip.type # srvctl status scan_listener PRCS-1026 : Could not find Single Client Access Name listener resources TYPE=ora.scan_listener.type |
scan 리스너 추가
scan IP 등록
1 2 3 4 5 6 7 | # srvctl add scan -n rac-scan # srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is not running # srvctl config scan SCAN name: rac-scan, Network: 1/192.168.137.0/255.255.255.0/ens33 SCAN VIP name: scan1, IP: /rac-scan/192.168.137.55 |
scan 리스너 등록
1 2 3 4 5 6 | # srvctl add scan_listener # srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is not running # srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 |
scan 리스너 기동
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # srvctl start scan # srvctl start scan_listener # crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.OCR_VOTE.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORADATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ORAFRA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started ora.gsd OFFLINE OFFLINE rac1 OFFLINE OFFLINE rac2 ora.net1.network ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.ons ONLINE ONLINE rac1 ONLINE ONLINE rac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac1 ora.cvu 1 ONLINE ONLINE rac2 ora.rac1.vip 1 ONLINE ONLINE rac1 ora.rac2.vip 1 ONLINE ONLINE rac2 ora.racdb.db 1 OFFLINE OFFLINE Instance Shutdown 2 OFFLINE OFFLINE ora.scan1.vip 1 ONLINE ONLINE rac1 |
정상적으로 등록됨
참조 :
https://m.blog.naver.com/blacksmail/150164251590
https://docs.oracle.com/cd/E14796_01/doc/rac.112/e10718/srvctladmin.htm
https://docs.oracle.com/cd/E11882_01/rac.112/e41960/srvctladmin.htm#RACAD7904
https://oracle-base.com/articles/rac/modifying-scan-configuration-rac-11gr2'ORACLE > Admin' 카테고리의 다른 글
오라클 bdump 경로에 생기는 sbtio.log 파일 (0) | 2020.07.10 |
---|---|
오라클 11g R2 RAC skgxn 라이브러리 (0) | 2020.07.05 |
오라클 11g R2 tfa(ahf) 설치 및 로그수집 가이드(SRDC) (0) | 2020.06.27 |
오라클 19c $ORACLE_HOME/dbs 디렉토리의 hc_{SID}.dat 파일과 lk{SID} 파일 (3) | 2020.06.25 |
오라클 19c 버퍼캐쉬 플러쉬 테스트(buffer cache flush) (0) | 2020.06.24 |