Quantcast
Channel: Oracle Database&EBS General – HELIOS BLOG
Viewing all articles
Browse latest Browse all 138

How do I change the listener port on Oracle?

$
0
0

You may need to change your database listener port. In this post we will do it together by following below steps

  1. Log in to the Linux operating system as the oracle user.
  2. Check the current listening status by using below command:
    lsnrctl status LISTENER

PS: On many system default listener name is LISTENER and default listener port is 1521 by default. You can check your listener name by using (ps -ef|grep tns) command

  1. Stop the listener service by using below command:
    lsnrctl stop LISTENER
  2. Change the port number in the files tnsnames.ora and listener.ora which is located under $ORACLE_HOME/network/admin path

In our case our port is 1521 and we will change it as 1453

$ vi listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(SID_NAME = ORCL)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = REGISTER))
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx)(PORT = 1521)) << replace 1521 with 1453 and save file
)
)

SECURE_REGISTER_LISTENER=(IPC)
  1. Check the initialization parameter “local_listener”. If it has been added than use below command to set to new value.

$ sqlplus / as sysdba
SQL> show parameter local_listener
SQL> alter system set local_listener=”(address=(protocol=tcp)(host=xxx)(port=1453))”;
SQL> exit

  1. Start the listening service. by using below command:
    lsnrctl start LISTENER
  2. After all those steps, test the new listening port up and running by using below commands.
  • Check whether the listening port is changed.
    netstat -na | grep “1543”
  • Check the listening status.
    lsnrctl status LISTENER

Viewing all articles
Browse latest Browse all 138

Trending Articles