Welcome back, recently I have shared how to change local listener port in Oracle 19c, Similarly today I will cover how to modify scan listener port in Oracle RAC 19c. To be honest with you, I never got such request from application team / Any team as of now. But recently my colleague forgot to check old setup, And he created scan listener port as his choice during installation.
Hence we had to change the scan listener port before we release the system to application team.
Table of Contents
Points to Note
- This activity requires downtime. And you need to inform Application team before you proceed as Application Team needs to change the port in their application as well.
- Don’t forget to change the port in your remote_listener parameter at database level
Step by Step on How to change Scan Listener Port in RAC Oracle 19c
Check the configuration And Scan listener status –
grid@oracledbworld1:~$ srvctl config scan_listener SCAN Listeners for network 1: Registration invited nodes: Registration invited subnets: Endpoints: TCP:1988 SCAN Listener LISTENER_SCAN1 exists SCAN Listener is enabled. SCAN Listener LISTENER_SCAN2 exists SCAN Listener is enabled. SCAN Listener LISTENER_SCAN3 exists SCAN Listener is enabled. grid@oracledbworld1:~$ crsctl stat res -t
Change the Port of Scan listener
grid@oracledbworld1:~$ srvctl modify scan_listener -p 8693 grid@oracledbworld1:~$
Restart the Scan Listener and Check the status of Scan Listener
grid@oracledbworld1:~$ srvctl stop scan_listener grid@oracledbworld1:~$ ps -ef | grep tns grid 86913 1 0 18:00:36 ? 0:02 /u01/oracle/app/product/grid/19.3.0/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit grid 34980 34239 0 19:29:36 pts/1 0:00 grep tns grid 86800 1 0 18:00:34 ? 0:00 /u01/oracle/app/product/grid/19.3.0/bin/tnslsnr LISTENER -no_crs_notify -inherit grid@oracledbworld1:~$
grid@oracledbworld1:~$ crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE oracledbworld1 STABLE ONLINE ONLINE oracledbworld2 STABLE ora.helper OFFLINE OFFLINE oracledbworld1 IDLE,STABLE OFFLINE OFFLINE oracledbworld2 STABLE ora.net1.network ONLINE ONLINE oracledbworld1 STABLE ONLINE ONLINE oracledbworld2 STABLE ora.ons ONLINE ONLINE oracledbworld1 STABLE ONLINE ONLINE oracledbworld2 STABLE ora.proxy_advm OFFLINE OFFLINE oracledbworld1 STABLE OFFLINE OFFLINE oracledbworld2 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.ARCH_USA.dg(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.DATA_USA.dg(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.LISTENER_SCAN1.lsnr 1 OFFLINE OFFLINE STABLE ora.LISTENER_SCAN2.lsnr 1 OFFLINE OFFLINE STABLE ora.LISTENER_SCAN3.lsnr 1 OFFLINE OFFLINE STABLE ora.MGMT.dg(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.MGMTLSNR 1 ONLINE ONLINE oracledbworld2 169.254.27.19 10.254 .96.234,STABLE ora.OCR_VOTE.dg(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.REDO1_USA.dg(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.REDO2_USA.dg(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.asm(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 Started,STABLE 2 ONLINE ONLINE oracledbworld2 Started,STABLE ora.asmnet1.asmnetwork(ora.asmgroup) 1 ONLINE ONLINE oracledbworld1 STABLE 2 ONLINE ONLINE oracledbworld2 STABLE ora.test.db 1 ONLINE ONLINE oracledbworld1 Open,Readonly,HOME=/u02/oracle/app/product/19.3.0/dbhome,STABLE 2 ONLINE ONLINE oracledbworld2 Open,Readonly,HOME=/u02/oracle/app/product/19.3.0/dbhome,STABLE ora.cvu 1 ONLINE ONLINE oracledbworld2 STABLE ora.oracledbworld1.vip 1 ONLINE ONLINE oracledbworld1 STABLE ora.oracledbworld2.vip 1 ONLINE ONLINE oracledbworld2 STABLE ora.mgmtdb 1 ONLINE ONLINE oracledbworld2 Open,STABLE ora.qosmserver 1 ONLINE ONLINE oracledbworld2 STABLE ora.rhpserver 1 OFFLINE OFFLINE STABLE ora.scan1.vip 1 ONLINE ONLINE oracledbworld1 STABLE ora.scan2.vip 1 ONLINE ONLINE oracledbworld2 STABLE ora.scan3.vip 1 ONLINE ONLINE oracledbworld2 STABLE --------------------------------------------------------------------------------
grid@oracledbworld1:~$ srvctl start scan_listener grid@oracledbworld1:~$ oracle@oracledbworld1:~$ srvctl config scan_listener SCAN Listeners for network 1: Registration invited nodes: Registration invited subnets: Endpoints: TCP:8693 SCAN Listener LISTENER_SCAN1 exists SCAN Listener is enabled. SCAN Listener LISTENER_SCAN2 exists SCAN Listener is enabled. SCAN Listener LISTENER_SCAN3 exists SCAN Listener is enabled. oracle@oracledbworld1:~$
Change the remote_listener parameter at Database level –
SQL> show parameter remote NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_dependencies_mode string TIMESTAMP remote_listener string test-scan:1988 remote_login_passwordfile string EXCLUSIVE remote_os_authent boolean FALSE remote_os_roles boolean FALSE remote_recovery_file_dest string result_cache_remote_expiration integer 0 SQL> alter system set remote_listener='test-scan:8693' sid='*' scope=both; System altered. SQL> show parameter remote NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_dependencies_mode string TIMESTAMP remote_listener string test-scan:8693 remote_login_passwordfile string EXCLUSIVE remote_os_authent boolean FALSE remote_os_roles boolean FALSE remote_recovery_file_dest string result_cache_remote_expiration integer 0 SQL>
Confirmation Before you release to Application Team
Once activity is completed, you have to ensure that you are able to connect from client connection.
sqlplus sys/<password>@tns_name_alias_db_name
Reference – How to Modify SCAN Setting or SCAN Listener Port after Installation (Doc ID 972500.1)