No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.

Knowledge Base

How do I change the listening port of the Oracle database

Publication Date:  2016-11-11  |   Views:  2697  |   Downloads:  0  |   Document ID:  EKB1000363703


Issue Description

How do I change the listening port of the Oracle database


1. Log in to the Linux operating system as the oracle user.

2. Check the current listening status.
lsnrctl status esightlistener

3. Stop the listening service.
lsnrctl stop esightlistener

4. Change the port number in the files tnsnames.ora and listener.ora.
cd /opt/oracle/product/11.2.0/db_1/network/admin/The listening file listener.ora is used as an example to describe how to change the listening port, for example, 31521 to a new listening port.

vi listener.ora
(GLOBAL_DBNAME = esight)
(SID_NAME = esight)

(ADDRESS = (PROTOCOL = TCP)(HOST = = 31521))


5. Modify the initialization parameter local_listener.
sqlplus / as sysdba
show parameter local_listener
alter system set local_listener="(address=(protocol=tcp)(host=";

6. Start the listening service.
lsnrctl start esightlistener

7. After the change is complete, log in and test the new listening port.
a. Check whether the listening port is changed.
netstat -na | grep "31521"
b. Check the listening status.
lsnrctl status esightlistener