You may need to change your database listener port. In this post we will do it together by following below steps
- Log in to the Linux operating system as the oracle user.
- 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
- Stop the listener service by using below command:
lsnrctl stop LISTENER - 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)
- 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
- Start the listening service. by using below command:
lsnrctl start LISTENER - 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