Serverside Configuration   «Prev  Next»

Lesson 4 Configuring the Oracle Listener
Objective Identify the relevant listener parameters and how they affect operations.

Configuring Oracle Listener

View the code below to examine a sample listener.ora file for a host called DILBERT containing two databases:
# Filename: Listener.ora
# 
LISTENER =
  (ADDRESS_LIST =
        (ADDRESS= (PROTOCOL= IPC)(KEY= tom))
        (ADDRESS= (PROTOCOL= IPC)(KEY= jerry))
        (ADDRESS= (PROTOCOL= TCP)(Host= dilbert)(Port= 1521))
  )
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME= dilbert.)
      (ORACLE_HOME= /ora7/home/dba/oracle/product/7.3.4)
      (SID_NAME = tom)
    )
    (SID_DESC =
      (GLOBAL_DBNAME= dilbert.)
      (ORACLE_HOME= /ora7/home/dba/oracle/product/7.3.4)
      (SID_NAME = jerry)
    )
  )
STARTUP_WAITTIME_LISTENER = 0
TRACE_LEVEL_LISTENER = OFF
The listener.ora file is actually very easy to configure. All the listener needs to know is the name of the host, the database name, the location of the Oracle software (ORACLE_HOME) and the port number on which to listen.
  1. tom
  2. and jerry.

Remember that while you may have dozens of Oracle databases on a host, you need only one listener.ora file on each host. While the default location for the listener.ora file is in $ORACLE_HOME/network/admin, problems can arise if you are running two Oracle databases on different versions of Oracle. Since two versions of Oracle means that there may be two ORACLE_HOME directories, it is important to ensure that there is only one listener.ora file on the host, and that you can find the file quickly. Hence, most experienced Oracle DBAs move the listener.ora file to a central location (/etc, or /var/opt/oracle) and replace the listener.ora file with a "soft link" pointing to the new listener.ora file location. Following are the UNIX commands to do this:

cd $ORACLE_HOME/network/admin
mv listsner.ora /etc
ln –s /etc/listsner.ora

Other parameters:
  1. The TRACE_LEVEL_LISTENER = OFF specifies that Oracle will not produce a trace file for each incoming connection and that this parameter should only be used for troubleshooting.
  2. If you expect the listener to handle large volumes of connection requests, you may also specify an Oracle "queue" for the listener process. This will enable the listener to dynamically handle larger numbers of concurrent connection requests.
To add a queue, simply enter the QUEUESIZE keyword at the end of any listening address in your listener configuration file. The following example shows a listener.ora file with the queue size specified.
The next lesson describes how the listener operates.

(protocol=tcp)(host=dilbert)
(port=1521)(queuesize=50)