How to Change Oracle Listener Default Name

Below example is executed based on AIX 6.1 operating system and Oracle database 11g.

1. Stop the Oracle listener and verify the status.

> lsnrctl
LSNRCTL for IBM/AIX ITSITI System/1234: Version 11.2.0.4.0
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.

LSNRCTL> stop
ps -ef | grep lsn

2. Go to the below directory where the listener.ora file located.

$ORACLE_HOME/network/admin

3. The default name of the listener is LISTENER. Here, we are changing to LSNT_DAERA.

## BEFORE

ADMIN_RESTRICTIONS_LISTENER = on
LISTENER =
  (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = IPC)
          (KEY = ARA.WORLD)
        )
        (ADDRESS=
          (PROTOCOL = IPC)
          (KEY = ARA)
        )
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = itsiti)
          (PORT = 1234)
        )
  )
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ARA)
      (ORACLE_HOME = /oracle/ARA/11202)
    )
  )
##AFTER

ADMIN_RESTRICTIONS_LSNT_DAERA = on
LSNT_DAERA =
  (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = IPC)
          (KEY = ARA.WORLD)
        )
        (ADDRESS=
          (PROTOCOL = IPC)
          (KEY = ARA)
        )
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = itsiti)
          (PORT = 1234)
        )
  )
STARTUP_WAIT_TIME_LSNT_DAERA = 0
CONNECT_TIMEOUT_LSNT_DAERA = 10
TRACE_LEVEL_LSNT_DAERA = OFF
SID_LIST_LSNT_DAERA =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ARA)
      (ORACLE_HOME = /oracle/ARA/11202)
    )
  )

4. Now, bring up the listener and check the new listener is running.

> ps -ef | grep lsn
      - 58:21 /oracle/ARA/112_64/bin/tnslsnr LSNT_DAERA -inherit

5. Login to the SQL*Plus and execute below commands,

SQL> show parameter local_listener

NAME             TYPE     VALUE
---------------- -------- -----------------------------------------------
local_listener   string   (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ARA)))

The hostname and port should be following the same on the listener.ora file.

SQL> alter system set local_listener='(address=(protocol=tcp)(host=xx)(port=xx))';
SQL> alter system register;

6. Done!

You May Also Like

Leave a Reply?