내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
다운로드
trending_flat
OS환경 : Oracle Linux 6.8 (64bit)
DB 환경 : Oracle Database 11.2.0.4 RAC
방법 : 오라클 11g R2 RAC 환경에서 리스너 관리
리스너 상태 조회
lsnrctl status 시 리스너가 나오지 않음
1 2 3 4 5 6 7 8 9 10 11 | [oracle@orcldb1 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-NOV-2018 15:50:49 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused |
export 명령으로 ORACLE_HOME을 GRID_HOME으로 변경해준다.
1 | [oracle@orcldb1 ~]$ export ORACLE_HOME=$GRID_HOME |
리스너 상태 재조회
잘나오는걸 확인할 수 있다.
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 | [oracle@orcldb1 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-NOV-2018 15:51:33 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 28-NOV-2018 15:45:57 Uptime 0 days 0 hr. 5 min. 36 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /oracle/app/11.2.0/grid/network/admin/listener.ora Listener Log File /oracle/app/oracle/diag/tnslsnr/orcldb1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.120)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.127)(PORT=1521))) Services Summary... Service "orcldb" has 1 instance(s). Instance "ORCLDB1", status READY, has 1 handler(s) for this service... The command completed successfully |
리스너 포트 변경
기존 1521에서 2521로 변경
1 2 3 4 5 6 7 8 | [root@orcldb1 ~]# srvctl stop listener -l LISTENER -n orcldb1 [root@orcldb1 ~]# srvctl stop listener -l LISTENER -n orcldb2 [root@orcldb1 ~]# srvctl modify listener -l LISTENET -p 2521 [root@orcldb1 ~]# srvctl modify listener -l LISTENET -p 2521 [root@orcldb1 ~]# srvctl start listener -l LISTENER -n orcldb1 [root@orcldb1 ~]# srvctl start listener -l LISTENER -n orcldb2 |
리스너 상태 재조회
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 | [root@orcldb1 ~]# su - oracle [oracle@orcldb1 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-NOV-2018 17:34:52 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 28-NOV-2018 15:45:57 Uptime 0 days 1 hr. 48 min. 55 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /oracle/app/11.2.0/grid/network/admin/listener.ora Listener Log File /oracle/app/oracle/diag/tnslsnr/orcldb1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.120)(PORT=2521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.127)(PORT=2521))) Services Summary... Service "orcldb" has 1 instance(s). Instance "ORCLDB1", status READY, has 1 handler(s) for this service... The command completed successfully |
+
tnsnames.ora 에 작성후 접속이 제대로 안될 때
평소에는 이런식으로 SERVICE_NAME으로 들어가는데 이렇게 안들어 가질 경우
1 2 3 4 5 6 7 8 9 10 | orcl = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.10)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL) ) ) |
아래처럼 SID로 변경후 접속해보길 바란다.
1 2 3 4 5 6 7 8 9 10 | orcl = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.10)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SID = ORCL) ) ) |
참조 : http://blog.naver.com/hanajava/220442951841
'ORACLE > Rac' 카테고리의 다른 글
오라클 11g R2 RAC 환경 운영중에 /etc/passwd 파일이 삭제된다면? (0) | 2020.06.19 |
---|---|
오라클 11g R2 asm rac 환경에서 ocr 백업 확인 및 백업 하기 (0) | 2020.01.04 |
오라클 11g R2 RAC IP 변경 방법(IP Change) (0) | 2018.12.10 |
오라클 11g R2 RAC 제거한 노드 다시 추가하는 방법 (0) | 2018.11.30 |
오라클 11g R2 RAC 노드 제거 방법 (2) | 2018.11.30 |