Sunday, January 29, 2017

How to change/Modify SCAN Listener port in oracle RAC


 CHANGE  SCAN LISTENER PORT IN RAC DATABASE
================================================

Step 1:- verify current status and port of scan listener 

[grid@rac1 ~]$ 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
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac2
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac1
[grid@rac1 ~]$



Step 2:-  Change port number of the SCAN LISTENER

[grid@rac1 ~]$ srvctl modify scan_listener -p 1585
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1585
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1585
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1585
[grid@rac1 ~]$

Step 3:- Restart SCAN LISTENER using below command 

[grid@rac1 ~]$ srvctl stop scan_listener
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl start scan_listener
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac2
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac1
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1585
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1585
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1585
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1585
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1585
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1585
[grid@rac1 ~]$
[grid@rac1 ~]$

Step 4:- Modify remote_listener parameter in each rac instance  also change port number in  tns entries

Before database stop change 

alter system set remote_listener='rac-scan:1585' scope=both sid='*';

Bounce database
[grid@rac1 ~]$ srvctl stop database -d orcl
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl start database -d orcl
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rac1
Instance orcl2 is running on node rac2
[grid@rac1 ~]$
[grid@rac1 ~]$ lsnrctl status LISTENER_SCAN2

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-JAN-2017 23:41:14

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN2
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                28-JAN-2017 23:32:15
Uptime                    0 days 0 hr. 8 min. 59 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid_1/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid_1/log/diag/tnslsnr/rac1/listener_scan2/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN2)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.110)(PORT=1585)))
Services Summary...
Service "orcl.localdomain.com" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain.com" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@rac1 ~]$
[grid@rac1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-JAN-2017 23:41:23

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-JAN-2017 17:45:42
Uptime                    0 days 5 hr. 55 min. 41 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid_1/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.201)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.40)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl.localdomain.com" has 1 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain.com" has 1 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@rac1 ~]$

[grid@rac2 bin]$ lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-JAN-2017 23:45:01

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                28-JAN-2017 23:32:13
Uptime                    0 days 0 hr. 12 min. 48 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid_1/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid_1/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.1.112)(PORT=1585)))
Services Summary...
Service "orcl.localdomain.com" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain.com" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@rac2 bin]$





No comments:

Post a Comment