Understanding SQL*Net

Contents Glossary Index Home Previous Next

Creating the LISTENER.ORA File

The LISTENER.ORA file describes the location of the listener, the services it listens for, and various control parameters. The contents of this file are described fully in Appendix A. This section describes the format of the file.

Placement of the Listener Name

The listener name must begin in the left-most column of a line, with no empty spaces preceding it.

Defining the Listener Addresses

The first section of LISTENER.ORA includes listener addresses. Network listener addresses are entered in the LISTENER.ORA file in the following form:

listener_name=[(ADDRESS_LIST=]
			(ADDRESS=
				[(COMMUNITY=community name)]
				(PROTOCOL=protocol name)
				(protocol specific information))
			[(ADDRESS=
				[(COMMUNITY=community name)]
				(PROTOCOL=protocol name)
				(protocol specific information)))] 

If the listener is listening on only one protocol, the ADDRESS_LIST keyword is not required; a single ADDRESS entry is sufficient. For a single community the form is:

listener_name=(ADDRESS=
			[(COMMUNITY=community name)]
			(PROTOCOL=protocol name)
			(protocol specific information)) 

The listener is able to listen on more than one protocol. For example, if the host machine is running both TCP/IP and DECnet (that is, it is in both a TCP/IP and a DECnet community), the listener on that machine has an address that includes both protocols.

IPC Addresses

In addition to listening on protocols, the listener listens on at least two IPC addresses that must be defined. In one, the key value is equal to the service name. This IPC address is used for connections from other applications on the same node. In the other IPC address, the key value is equal to the database system identifier (SID), which is described in the next section. This IPC address is used by the database dispatcher to identify the listener.

Note: If the service name is the same as the SID, only one IPC address is needed, and only one is generated by Network Manager.

Sample Listener Addresses

LISTENER=(ADDRESS_LIST=
			(ADDRESS=
				(PROTOCOL=IPC)
				(KEY=ny_finance.hq.fin.acme)
			)
			(ADDRESS=
				(PROTOCOL=IPC)
				(KEY=db3)
			)
			(ADDRESS=
				(COMMUNITY=tcpcomm)
				(PROTOCOL=TCP)
				(HOST=flash.hq.fin.acme)
				(PORT=1521)
			)
			(ADDRESS=
				(COMMUNITY=deccomm.hq.fin.acme)
				(PROTOCOL=DECNET)
				(NODE=flash.hq.fin.acme)
				(OBJECT=LSNR)
			)
		) 

If you are creating the LISTENER.ORA file manually, and if there is only one community in your network, then the COMMUNITY keyword is optional for the listener, since listening is always performed on the local machine. You do, however, have the option to include it for consistency with your other connect descriptors. If you are using Network Manager you must provide the COMMUNITY keyword, but it is not included in the LISTENER.ORA file that is generated.

Describing the Databases on the Listener

The second section of the LISTENER.ORA file describes the system identifiers (SIDs) of the databases served by the listener. It is made up of keyword-value pairs as follows:

SID_LIST_listener_name=[(SID_LIST=]
				(SID_DESC=
				   (GLOBAL_DBNAME=global_database_name)
				   (SID_NAME=SID)
				   (operating_system_specific_
				     string=db_location)
				)
				[(SID_DESC=
				   (GLOBAL_DBNAME=global_database_name)
				   (SID_NAME=SID)
				   (operating_system_specific_
				    string=db_location)
				)]
			    [)]

The SID_LIST keyword is required only if there is more than one database instance installed on the machine. In this format, SID is the Oracle system ID of the database server. In the next keyword-value pair, the keyword is operating system specific: it is indicated here as the variable operating_system_specific_string. Its value, indicated here as db_location, is the specific location of the database executables.

LISTENER.ORA Control Parameters

The third section of the LISTENER.ORA file contains a list of parameters that control the behavior of the listener. The parameters are entered in the following format:

PARAMETER=value

Do not allow any empty spaces on the line before the parameter name. Parentheses do not need to surround the parameter-value pairs.


Contents Glossary Index Home Previous Next