ITPub博客

首页 > 数据库 > Oracle > How To modify SCAN listener Port

How To modify SCAN listener Port

原创 Oracle 作者:yyp2009 时间:2015-07-24 11:43:20 0 删除 编辑

********************************************************************
********************************************************************
grid@OSS-FWKT-DB1:/home/db/grid$ ps -ef |grep lsnr
    grid  7471364        1   1   Mar 06      - 15418:34 /u01/db/grid/product/11.2.0/bin/tnslsnr LISTENER -inherit
    grid  7930362        1   1   Mar 06      - 3149:36 /u01/db/grid/product/11.2.0/bin/tnslsnr LISTENER_SCAN1 -inherit
    grid 29360420 30736484   0 10:25:02  pts/4  0:00 grep lsnr
grid@OSS-FWKT-DB1:/home/db/grid$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1621
grid@OSS-FWKT-DB1:/home/db/grid$  lsnrctl status listener_scan1

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.4.0 - Production on 24-JUL-2015 10:18:42

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 IBM/AIX RISC System/6000: Version 11.2.0.4.0 - Production
Start Date                06-MAR-2014 16:06:28
Uptime                    7 days 15 hr. 44 min. 21 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /u01/db/grid/product/11.2.0/network/admin/listener.ora
Listener Log File         /u01/db/grid/product/11.2.0/log/diag/tnslsnr/OSS-FWKT-DB1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=135.148.128.137)(PORT=1621)))
Services Summary...
Service "fwktdb" has 2 instance(s).
  Instance "fwktdb1", status READY, has 1 handler(s) for this service...
  Instance "fwktdb2", status READY, has 1 handler(s) for this service...
Service "fwktdbXDB" has 2 instance(s).
  Instance "fwktdb1", status READY, has 1 handler(s) for this service...
  Instance "fwktdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
*************************************************************************
*************************************************************************
As grid user:


1. Modify SCAN listener port:
grid@OSS-FWKT-DB1:/home/db/grid$ srvctl modify scan_listener -p 1521
grid@OSS-FWKT-DB1:/home/db/grid$  srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
grid@OSS-FWKT-DB1:/home/db/grid$ lsnrctl status listener_scan1


LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.4.0 - Production on 24-JUL-2015 10:32:39


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 IBM/AIX RISC System/6000: Version 11.2.0.4.0 - Production
Start Date                06-MAR-2014 16:06:28
Uptime                    7 days 15 hr. 58 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /u01/db/grid/product/11.2.0/network/admin/listener.ora
Listener Log File         /u01/db/grid/product/11.2.0/log/diag/tnslsnr/OSS-FWKT-DB1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=135.148.128.137)(PORT=1621)))
Services Summary...
Service "fwktdb" has 2 instance(s).
  Instance "fwktdb1", status READY, has 1 handler(s) for this service...
  Instance "fwktdb2", status READY, has 1 handler(s) for this service...
Service "fwktdbXDB" has 2 instance(s).
  Instance "fwktdb1", status READY, has 1 handler(s) for this service...
  Instance "fwktdb2", status READY, has 1 handler(s) for this service...
The command completed successfully


2. Restart SCAN listener so the new port will be effective:
grid@OSS-FWKT-DB1:/home/db/grid$ srvctl stop scan_listener


或者As grid user
OSS-FWKT-DB1[/u01/db/grid/product/11.2.0/bin]#./srvctl stop scan_listener
PRCC-1016 : LISTENER_SCAN1 was already stopped
PRCR-1005 : Resource ora.LISTENER_SCAN1.lsnr is already stopped


OSS-FWKT-DB1[/u01/db/grid/product/11.2.0/bin]#./srvctl start scan_listener
OSS-FWKT-DB1[/u01/db/grid/product/11.2.0/bin]#./srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
grid@OSS-FWKT-DB1:/home/db/grid$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node oss-fwkt-db1


另外一个节点:
grid@OSS-FWKT-DB2:/home/db/grid$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node oss-fwkt-db1                                                           
3. Modify Database remote_listener:


SQL> alter system set remote_listener='fwktdb-scan:1621' scope=both sid='*';
System altered.
SQL> alter system register;
System altered.
SQL> show parameters remote_listener
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_listener                      string      fwktdb-scan:1621

参考文档:mos:972500.1。


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13750068/viewspace-1749438/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-10-17

  • 博文量
    330
  • 访问量
    1025095