Where to Find Oracle Listener Port & How to Change It

Locate Oracle Listener Port

1. You find out the Oracle listener port number from listener.ora file. In Windows, the file is located in below directory,

C:\oracle\<ORACLE-VERSION>\<HOST>\NETWORK\ADMIN

2. Open the listener.ora file and you will get the port number (1521).

# listener.ora Network Configuration File: C:\oracle\10.2.0\ITsiti\
network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\10.2.0\ITsiti)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = itsiti)(PORT = 1521))
    )
  )

3. Alternatively, you can use the command LSNRCTL.EXE (Windows) LSNRCTL (UNIX, Linux) and use the option STATUS to determine the port.

> LSNRCTL.EXE

LSNRCTL for 64-bit Windows: Version 10.2.0.4.0
Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> STATUS
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 10.2.0.4.0
Start Date                11-JAN-2014 01:16:56
Uptime                    0 days 9 hr. 35 min. 47 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\oracle\10.2.0\ITsiti\network\admin\listener.ora
Listener Log File         C:\oracle\10.2.0\ITsiti\network\log\listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=itsiti)(PORT=1521)))

Changing Oracle Listener Port

1. First of all, shutdown your SAP application and the listener service.

2. Locate the following files (tnsnames.ora, listener.ora). You may look them from the below locations,

/oracle/SID/[ORA_VERS]/network/admin (tnsnames.ora, listener.ora)
/sapmnt/SID/profile/oracle (tnsnames.ora)

3. Open tnsnames.ora and change the port number,

LISTENER_SID.WORLD =
(ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)
(HOST = itsiti)(PORT = 1234))

SID.WORLD =
(DESCRIPTION =
(ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)
(HOST = itsiti)(PORT = 1234))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SID)

4. Next, open the listener.ora file and change the port number.

        )
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = itsiti)
          (PORT = 1234)

5. Finally, start the listener and your SAP application.

You May Also Like

Leave a Reply?