next up previous contents
Next: Starting the Listener Up: The Listener Previous: The Listener   Contents

Configuring the Listener

Configuring the listener is easy enough. The listener are configured in the $ORACLE_HOME/network/admin/listener.ora configuration file. Here is a basic configuration:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.130)(PORT = 1521))
    )
  )
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
      (SID_NAME = test)
    )
  )

The first section is labeled "LISTENER", this is the name of the listener itself, and can be anything you like although "LISTENER" is the traditional name. Then we have some nested configuration parameters, the most important of which is the address section, which in this case specifies the listener to use TCP, on host address 10.10.0.130 port 1521. Port 1521 is the traditional default port, but again you can use anything you like.

The SID_LIST_LISTENER defines our essential parameters, namely the SID_NAME (same as $ORACLE_SID) and ORACLE_HOME (same as $ORACLE_HOME). The name "SID_LIST_LISTENER" actually is derived from the LISTENER name, so if you did actually change the listeners name to "MYLISTENER", for instance, your second section would be "SID_LIST_MYLISTENER".

If you wanted to have multiple databases specified you could nest more SID_DESC parameters in the SID_LIST. In the same way, if you wanted to listen on diffrent IP addresses you could use multiple DESCRIPTION sections in the DESCRIPTION_LIST. For example:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.130)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.0.10)(PORT = 1522))
    )
  )
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
      (SID_NAME = test)
    )
    (SID_DESC =
      (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
      (SID_NAME = anotherdb)
    )
  )

For complete details on syntax, please check out the Oracle Database Net Services Reference Guide:

http://download-west.oracle.com/docs/cd/B12037_01/network.101/b10776/toc.htm


next up previous contents
Next: Starting the Listener Up: The Listener Previous: The Listener   Contents
2005-02-10