Oracle 11gR 2 RAC SCAN 감청 및 로 컬 감청 포트 수정

SCAN 감청 포트 수정
SCAN 감청 포트 를 3521 로 변경 하고 로 컬 감청 포트 는 변 하지 않 으 며 여전히 1521 입 니 다.
[root@web1 ~]# srvctl modify scan_listener -p 3521

수정 후 감청 상태 확인:
[grid@web2 ~]$ lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 06-5  -2016 01:32:52

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

      (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
LISTENER   STATUS
------------------------
                        LISTENER_SCAN1
                        TNSLSNR for Linux: Version 11.2.0.3.0 - Production
                      06-5  -2016 01:31:28
                    0   0    1   23  
                      off
                       ON: Local OS Authentication
SNMP                      OFF
                  /u01/app/11.2.0/grid/product/db_1/network/admin/listener.ora
                  /u01/app/11.2.0/grid/product/db_1/log/diag/tnslsnr/web2/listener_scan1/alert/log.xml
      ...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.15)(PORT=1521)))
    ..
   "prod"    2"prod1",    READY,        1      ...
     "prod2",    READY,        1      ...
   "prodXDB"    2"prod1",    READY,        1      ...
     "prod2",    READY,        1      ...
      
[grid@web2 ~]$ 

SCAN 감청 포트 번호 가 발견 되 었 습 니까? 아니면 1521 입 니까? 감청 을 다시 시작 하지 않 았 기 때 문 입 니 다. 그 다음 에 감청 을 다시 시작 합 니 다.
[root@web1 ~]# srvctl stop scan_listener
[root@web1 ~]# srvctl start scan_listener

변경 확인:
[root@web1 ~]# srvctl config scan_listener
SCAN      LISTENER_SCAN1: TCP:3521
[root@web1 ~]# 

SCAN 감청 을 다시 시작 한 후 상 태 를 다시 봅 니 다.
[grid@web2 ~]$ lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 06-5  -2016 01:34:47

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

      (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
LISTENER   STATUS
------------------------
                        LISTENER_SCAN1
                        TNSLSNR for Linux: Version 11.2.0.3.0 - Production
                      06-5  -2016 01:34:42
                    0   0    0   4  
                      off
                       ON: Local OS Authentication
SNMP                      OFF
                  /u01/app/11.2.0/grid/product/db_1/network/admin/listener.ora
                  /u01/app/11.2.0/grid/product/db_1/log/diag/tnslsnr/web2/listener_scan1/alert/log.xml
      ...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.15)(PORT=3521)))
         
      
[grid@web2 ~]$ 

포트 가 3521 로 수정 되 었 음 을 발 견 했 습 니 다. 모니터 에 인 스 턴 스 가 등록 되 지 않 았 을 뿐 192.168.15: 3521 / prod 라 는 원 격 방식 으로 데이터 베 이 스 를 방문 할 수 없습니다. 다음은 인 스 턴 스 를 수정 한 reote 입 니 다.listener 매개 변 수 는 인 스 턴 스 를 SCAN 모니터 에 등록 합 니 다.
[root@web1 ~]# su - oracle
[oracle@web1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on     5  6 01:20:17 2016

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


   : 
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> show parameter remote_listener

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
remote_listener                      string                            web-cluster-scan:1521
SQL> 
SQL> alter system set remote_listener='web-cluster-scan:3521';

     。

SQL> 

실행 이 완료 되면 SCAN 모니터 를 보고 인 스 턴 스 가 등록 되 었 습 니 다.
[grid@web2 ~]$ lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 06-5  -2016 01:45:37

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

      (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
LISTENER   STATUS
------------------------
                        LISTENER_SCAN1
                        TNSLSNR for Linux: Version 11.2.0.3.0 - Production
                      06-5  -2016 01:34:42
                    0   0    10   54  
                      off
                       ON: Local OS Authentication
SNMP                      OFF
                  /u01/app/11.2.0/grid/product/db_1/network/admin/listener.ora
                  /u01/app/11.2.0/grid/product/db_1/log/diag/tnslsnr/web2/listener_scan1/alert/log.xml
      ...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.15)(PORT=3521)))
    ..
   "prod"    2"prod1",    READY,        1      ...
     "prod2",    READY,        1      ...
   "prodXDB"    2"prod1",    READY,        1      ...
     "prod2",    READY,        1      ...
      
[grid@web2 ~]$ 

다음은 원 격 접근 을 통 해 접근 이 성공 할 수 있 습 니 다.
C:\Users\Bill>sqlplus sys/oracle@192.168.1.15:3521/prod as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on     5  6 01:47:27 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


   :
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL>

다음 4 개의 ip 주 소 는 Public ip 또는 vip 입 니 다. 그들 은 모두 로 컬 모니터 에 의 해 감청 되 고 포트 는 1521 이 며 3521 로 바 뀌 지 않 았 기 때 문 입 니 다.
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as SYSDBA

위 에서 모두 다음 과 같은 잘못 을 보고 하 였 다.
SQL*Plus: Release 11.2.0.4.0 Production on     5  6 01:49:31 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved. ERROR: ORA-12541: TNS:      

로 컬 감청 포트 수정
현재 모니터 의 설정 정보 가 져 오기:
[root@web1 ~]# srvctl config listener
  : LISTENER
  : 1,    : grid
   : <CRS home>
  : TCP:1521
[root@web1 ~]# 

다음은 1 노드 의 로 컬 감청 포트 를 3521 로 수정 합 니 다.
[root@web1 ~]# srvctl modify listener -l LISTENER -p "TCP:3521"

수정 후 상태 보기:
[grid@web1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 06-MAY-2016 02:01:43

Copyright (c) 1991, 2011, 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.3.0 - Production
Start Date                06-MAY-2016 01:15:17
Uptime                    0 days 0 hr. 46 min. 25 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/product/db_1/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/web1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.11)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.13)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "prod" has 1 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@web1 ~]$ 

아직 수정 되 지 않 았 습 니 다. 감청 을 다시 시작 해 야 합 니 다.
[root@web1 ~]# srvctl stop listener
[root@web1 ~]# srvctl start listener
[root@web1 ~]# 

재 부팅 후 상태 확인:
[grid@web1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 06-MAY-2016 02:02:57

Copyright (c) 1991, 2011, 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.3.0 - Production
Start Date                06-MAY-2016 02:02:30
Uptime                    0 days 0 hr. 0 min. 27 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/product/db_1/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/web1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.11)(PORT=3521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.13)(PORT=3521)))
The listener supports no services
The command completed successfully
[grid@web1 ~]$ 

포트 는 3521 로 수정 되 었 으 나 인 스 턴 스 가 등록 되 지 않 았 습 니 다. 아래 매개 변수 local 을 수정 합 니 다.listener 는 인 스 턴 스 의 PMON 프로 세 스 를 모니터 에 등록 하도록 합 니 다.
[oracle@web1 ~]$ sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on     5  6 02:03:50 2016

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


   : 
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> alter  system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.13)(PORT=3521))))' sid='prod1';

     。

SQL> 

수정 완료 후 바로 감청 상태 확인:
[grid@web1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 06-MAY-2016 02:10:19

Copyright (c) 1991, 2011, 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.3.0 - Production
Start Date                06-MAY-2016 02:02:30
Uptime                    0 days 0 hr. 7 min. 48 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/product/db_1/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/web1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.11)(PORT=3521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.13)(PORT=3521)))
Services Summary...
Service "prod" has 1 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
Service "prodXDB" has 1 instance(s).
  Instance "prod1", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@web1 ~]$ 

실례 가 이미 등 록 된 것 을 발견 하 다.같은 방법 으로 노드 2 의 로 컬 감청 포트 도 3521 로 수정 하고 인 스 턴 스 를 로 컬 감청 에 등록 합 니 다. 절차 가 위 와 같 기 때문에 더 이상 군말 하지 않 습 니 다.
SCAN 모니터 의 포트 와 로 컬 모니터 의 포트 를 수정 함으로써 아래 5 개의 IP 주 소 는 모두 데이터 베 이 스 를 정상적으로 방문 할 수 있 습 니 다.
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba
C:\Users\Bill>sqlplus sys/[email protected]:3521/prod as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on     5  6 02:17:22 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


   :
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options


HELLO
-------------------------------------------------------------------------------------
The print set file:D:\u01\app\oracle\product\11.2.0\dbhome_1\sqlplus\admin\glogin.sql

SQL>

총결산
1. SCAN 모니터 의 포트 만 수정 하고 로 컬 모니터 의 포트 를 수정 하지 않 으 면 SCAN IP 는 수 정 된 포트 로 데이터 베 이 스 를 방문 할 수 있 으 며, PUBLIC IP 와 VIP 는 새 포트 로 데이터 베 이 스 를 방문 할 수 없다.2. SCAN 모니터 와 로 컬 모니터 의 포트 가 수정 되면 모든 IP 주 소 는 새 포트 로 데이터 베 이 스 를 방문 할 수 있 습 니 다.
Reference
설치 후 SCAN 설정 또는 SCAN 수신 기 포트 를 수정 하 는 방법 (문서 ID 972500.1) RAC / EXADATA 에서 수신 기 포트 변경 (문서 ID 1473035.1)

좋은 웹페이지 즐겨찾기