Net8 Administrator's Guide
Release 8.1.6

A76933-01

Library

Product

Contents

Index

Prev Next

7
Configuring the Listener

This chapter describes how to configure the listener. It includes the following sections:

Configuration Overview

The listener is a separate process that resides on the server. It receives incoming client connection requests and manages the traffic of these requests to the server.

A listener is configured with one or more listening protocol addresses and service information about the destination service.

Protocol addresses are configured in the listener configuration file, listener.ora. Service information may or may not be configured in the listener.ora file:

Once the listener is configured, the listener may be managed with the Listener Control Utility (LSNRCTL).


Note:

A release 8.1.6 listener is required for an Oracle8i release 8.1.6 database. Previous version of the listener are not supported for use with an Oracle8i release 8.1.6 database. However, it is possible to use a release 8.1.6 listener with previous versions of the Oracle8i database. 


This section covers the following additional configuration topics:

Default Listening Protocol Addresses

The listener has a default name of LISTENER and is configured to listen on the following default protocol addresses:

Clients configured with these addresses can connect to the listener.

Configuration During Installation

Net8 Configuration Assistant is launched by the Oracle Universal Installer after software installation. It enables you to configure the protocol address and service information for a database.

After a Typical or Minimal installation on the server, Net8 Configuration Assistant automatically configures a listener with a name of LISTENER for an Oracle8i database using the TCP/IP protocol. After a Custom installation, Net8 Configuration Assistant prompts you to configure a listener name and a protocol address of your choice.

Additionally, a listening address for external procedures--functions that can be called from PL/SQL code--using the IPC protocol is automatically configured, regardless of the installation type.

Net8 Configuration Assistant also automatically configures service information for the Oracle8i database and the external procedures in the listener.ora file.


Note:

While service information is not required in the listener.ora file for an Oracle release 8.1 database service, Net8 Configuration Assistant assumes that you may use Oracle Enterprise Manager to monitor the database. Oracle Enterprise Manager requires this information to discover the database. 


Shown next is a listener.ora file sample. The LISTENER entry defines the listening protocol address for a listener named LISTENER, and the SID_LIST_LISTENER entry provides information about the database service, including the global database name, the Oracle home location of the database, and the Oracle System Identifier (SID) of the instance.

listener=
    (description=
      (address_list=
       (address=(protocol=tcp)(host=sale-server)(port=1521))
       (address=(protocol=ipc)(key=extproc))
sid_list_listener=
  (sid_list=
    (sid_desc=
      (global_dbname=sales.us.acme.com)
      (oracle_home=/oracle81)
      (sid_name=sales)))
    (sid_desc=
      (sid_name=plsextproc)
      (oracle_home=/oracle81)
      (program=extproc)))

Configuration with Net8 Assistant

If the default or installed configuration is not adequate or the network has older versions of the listener or database, you can use Net8 Configuration Assistant to enhance the listener.ora configuration.

The following listener configuration file items are addressed in the following sections:

Re-Starting the Listener After a listener.ora File Modification

Anytime the listener.ora is modified, the listener must be stopped and re-started with the LSNRCTL utility.

To start or stop the listener:

LSNRCTL
LSNRCTL> start|stop [listener_name]

where listener_name is the name of the listener defined in the listener.ora file. It is not necessary to identify the listener if you are using the default listener, named LISTENER.

See Also:

 

Configuring Listener Protocol Addresses

To configure other, non-default protocol listener addresses:

  1. Start Net8 Assistant:

    • On UNIX, run netasst from $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. In the navigator pane, expand Local > Listeners.

  3. Select a listener.


    Note:

    If a listener.ora file has been configured, but the listener has never been started with the LSNRCTL utility, the Listeners folder does not display a listener. If this occurs, exit Net8 Assistant, start the listener, as described in "Using Net8 Control Utilities", and start Net8 Assistant again. 


    If a listener has never been created:

    1. Click "+" from the toolbar or select Create from the Edit menu.

    2. Enter a unique listener name in the Choose Listener Name dialog box.

  4. From the list in the right pane, select Listening Locations.

  5. Click Add Address. A new address tab appears.


  6. Select a protocol and enter the appropriate protocol parameter information for the selected protocol.

    See Also:

    Appendix B for further information about protocol addresses and parameters 

    When configuring the listener to listen on TCP/IP, you should choose the default port or 1521. If you do not, you must configure the LOCAL_LISTENER parameter in the initialization parameter file and resolve the listener name through a naming method.

    See Also:

    "Configuring a Listener that Uses a Non-Default Address" 

    If your machine has more than one IP address and you want the listener to listen on all available IP addresses, configure TCP/IP or TCP/IP with SSL and enter the host name of the machine in the Host field.

  7. Repeat Step 5 and 6 for additional protocols.

  8. Choose File > Save Network Configuration.

A listener.ora file statically configured with TCP/IP and SPX address follows:

listener=
  (address=(protocol= tcp)(host= sales-server)(port= 1521))
  (address=(protocol= spx)(service=orasrvc1))

Configuring Listening Addresses for Oracle8i JServer

Connections to the Oracle8i JServer in the database requires the TCP/IP or TCP/IP with SSL protocol addresses

To configure a listening address for Oracle8i JServer:

  1. Start Net8 Assistant:

    • On UNIX, run netasst from $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. In the navigator pane, expand Local > Listeners.

  3. Select a listener.

  4. From the list in the right pane, select Listening Locations.

  5. Click Add Address. A new address tab appears.


  6. Select the TCP/IP or TCP/IP with SSL protocol from the Protocol list.

  7. Enter the host name of the database in the Host field.

  8. Enter port 2481 if the chosen protocol is TCP/IP in the Port field, or enter port 2482 if the chosen protocol is TCP/IP with SSL in the Port field.

  9. Click "Dedicate this endpoint to IIOP connections".

  10. Choose File > Save Network Configuration.

    The listener.ora file updates with the following:

    listener=
     (description_list=
      (descriptioin=
       (address=(protocol=tcp)(host=sales1-server)(port=2481))
       (protocol_stack=
         (presentation=giop)
         (session=raw))))
    

    See Also:

     

Configuring a Listener that Uses a Non-Default Address

By default, the PMON process registers with the local listener on the default local address of TCP/IP on a port 1521. If you want to register information with another listener, you must configure the LOCAL_LISTENER parameter in the initialization parameter file in order for PMON to register information with it. The value for LOCAL_LISTENER must then be resolved with a net service name entry in the tnsnames.ora file or an Oracle Names server.

Configuring the LOCAL_LISTENER Parameter

The LOCAL_LISTENER parameter should be configured as follows in the initialization parameter file:

local_listener=listener_name_alias

Configuring a Naming Method

The listener name alias specified for the LOCAL_LISTENER parameter must be resolved through a one of the following naming methods:

tnsnames.ora File

A net service name entry should be created for the listener address without the CONNECT_DATA portion of the connect descriptor. Net8 Assistant does not enable you to configure a tnsnames.ora file without the CONNECT_DATA information. Therefore, Oracle Corporation recommends that you modify the tnsnames.ora file manually.

For example, if LOCAL_LISTENER is set to LISTENER1 and LISTENER1 uses TCP/IP on port 1421, the entry in the tnsnames.ora file would look like:

listener1= 
  (address=(protocol= tcp)(host= sales-server)(port= 1421))


Note:

Multiple addresses are supported, but connect-time failover and client load balancing features are not supported. Oracle Connection Manager's SOURCE_ROUTE parameter is supported.  


See Also:

Chapter 8 for further information about multiple address configuration 

Oracle Names Server

An entry for the listener alias name can be made to an Oracle Names server through Net8 Assistant:

  1. Start Net8 Assistant:

    • On UNIX, run netasst from $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. In the navigator pane, expand Oracle Names Servers.

  3. Select the Oracle Names server.

  4. From the list in the right pane, select Manage Data.

  5. Click the Advanced tab.

  6. Click Add, enter the listener alias name in the Name field, A.SMD record type in the Type field, and enter the address in the Value field, for example:

    (address=(protocol= tcp)(host= sales-server)(port= 2481))
    
    
  7. Choose File > Save Network Configuration.

Handling Large Volumes of Connection Requests

If you expect the listener to handle large volumes of connection requests, you may specify a queue for the process. This enables the listener to dynamically handle larger numbers of concurrent connection requests.

To specify a queue size for a listener, enter a value to the QUEUESIZE parameter at the end of any listening address:

listener=
  (address= 
     (protocol= tcp) 
     (host= sales-server) 
     (port= 1521)
     (queuesize=20))


Note:

Currently, you can configure only the queue size for listeners operating on TCP/IP and DECnet. The default queue size is system specific. On Solaris, the default queue size is set to 5. The queue size is 5 for Windows NT 4.0 Workstation and 50 for Windows NT 4.0 Server. 


Configuring Static Service Information

In order for the listener to accept client requests to an Oracle8 release 8.0 or Oracle7 database, the listener.ora file must be configured with information about the database. Static configuration is also required for other services, such as external procedures and Heterogeneous Services, and some management tools, including Oracle Enterprise Manager.

In Oracle8 release 8.1, the listener uses the dynamic information about the database and instance it has received through service registration before using statically configured information.

The listener.ora file can be configured with service parameters described in the following table:

listener.ora File Parameter  Net8 Assistant Field  Description 

SID_NAME 

SID 

The Oracle System Identifier (SID) identifies the instance. You can obtain the SID value from the INSTANCE_NAME parameter in the initialization parameter file.

Note: This setting is required on UNIX and Windows NT. 

GLOBAL_DBNAME 

Global Database Name 

The global database name is comprised of the database name and database domain name. You can obtain the GLOBAL_DBNAME value from the SERVICE_NAMES parameter or the DB_NAME and DB_DOMAIN parameters in the initialization parameter file. 

ORACLE_HOME 

Oracle Home Directory 

The Oracle Home Directory identifies the Oracle home location of the database that you are specifying.

Note: This setting is required on UNIX. 

Important:

If you are using connect-time failover or Transparent Application Failover (TAF), such as in an Oracle Parallel Server environment, do not set the GLOBAL_DBNAME parameter. A statically configured global database name disables these features. 

See Also:

 

To statically configure the listener:

  1. Start Net8 Assistant:

    • On UNIX, run netasst from $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. In the navigator pane, expand Local > Listeners.

  3. Select a listener.

  4. From the list in the right pane, select Database Services.

  5. Click Add Database. A new database tab appears.


  6. Enter the global database name, location of the Oracle home directory, and the Oracle System Identifier (SID) of the instance in the appropriate fields.

  7. Choose File > Save Network Configuration.

An excerpt of a listener.ora file statically configured for a database service called sales.us.acme.com follows:

sid_list_listener=
(sid_list=
 (sid_desc=
  (global_dbname=sales.us.acme.com)
  (sid_name=sales)
  (oracle_home=/u01/app/oracle/8.1.6)))

Configuring Prespawned Dedicated Servers

Prespawned dedicated servers are dedicated servers started by the listener at startup before any incoming connection requests. They improve the time it takes to establish a connection on servers where multi-threaded server (MTS) is not used. They also use allocated memory and system resources better by recycling server processes for use by other connections without shutting down and recreating a server.


Note:

Oracle Corporation recommends that you use MTS rather than prespawned dedicated server to solve performance and scaleability problems. 



Note:

Prespawned dedicates servers are not available for Windows NT. 


The listener.ora file can be configured with the prespawned dedicated server parameters described in the following table:

listener.ora File Parameter  Net8 Assistant Field  Description 

PRESPAWN_MAX 

Maximum Prespawned Servers 

The maximum number of prespawned dedicated servers the listener can create. This number must be at least as many as the sum of the pool size for each protocol. Set this value to a large number so that prespawned dedicated servers are always available for new connections. 

PROTOCOL 

TCP/IP, SPX, Named Pipes, IPC 

The protocol on which the listener creates prespawned dedicated servers.  

POOL_SIZE 

Number 

The number of unused prespawned dedicated servers for the listener to maintain on the selected protocol. Choose a number that is greater than 0 but no greater than the PRESPAWN_MAX value. The value should be about what you expect the average number of connections to be at any given time. 

TIMEOUT 

Timeout 

Time in minutes that an inactive prespawned dedicated server process waits for the next connection. The value should be greater than 0. (A value of 0 enables an inactive shadow process to continue indefinitely, thus wasting machine resources.) Set a short time-out value. The time out is activated only after a prespawned dedicated server process has carried a connection and been disconnected. In other words, prespawned dedicated servers that are waiting for their first connection do not time out. 

In Oracle8i release 8.1, the listener handles client requests based on information it receives from PMON through service registration rather than static information in the listener.ora file. If dynamic information for a particular service name or instance names is not available, the listener falls back to the static information. Because of this, additional configuration is necessary in order to use prespawned dedicated servers.

You can configure some clients to use the prespawned dedicated servers and other clients to use service handlers (dedicated servers or MTS dispatchers) that have been dynamically registered with the listener. For those clients that are to use prespawned dedicated servers, no special configuration is needed. Clients should use connect descriptors that contain a SERVICE_NAME or a SID parameter value that matches the GLOBAL_DBNAME or the SID_NAME parameter value in the listener.ora file.

Clients that are to use dynamically registered service handlers should use connect descriptors that contain a SERVICE_NAME parameter value that is different from the GLOBAL_DBNAME parameter value specified in the listener.ora. This service name has to be configured in the initialization parameter file with the SERVICE_NAMES parameter. Once the database is started, the service name is dynamically registered with the listener and the clients can connect to the database.

For an environment with pre-release 8.1 clients, an analogous modification needs to be done for INSTANCE_NAME parameter in the initialization parameter file. It has to be set to a value different from SID_NAME specified in the listener.ora file. The INSTANCE_NAME parameter value dynamically registers with the listener along with the SERVICE_NAMES parameter value and service handler information. The fact that this INSTANCE_NAME parameter value is different from the SID_NAME parameter value in the listener.ora file ensures that the clients that use connect descriptors containing SID (and matching the SID_NAME value) are redirected to a prespawned dedicated server.

Configuration tasks are described in the following sections:

Configure the listener.ora File with Prespawned Dedicated Server

To configure prespawned dedicated servers in the listener.ora file:

  1. Start Net8 Assistant:

    • On UNIX, run netasst from $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. In the navigator pane, expand Local > Listeners.

  3. Select a listener.

  4. From the list in the right pane, select Database Services.

  5. Select Use Prespawned Dedicated Server, and click Configure Prespawned Servers.

    The Configure Prespawned Servers dialog box appears:


  6. Specify the number of dedicated servers to start for each protocol.

  7. Choose File > Save Network Configuration.

An excerpt of a listener.ora file configured with prespawned dedicated servers follows:

sid_list_listener=
(sid_list=
 (sid_desc=
  (global_dbname=sales.us.acme.com)
  (sid_name=sales)
  (oracle_home=/u01/app/oracle/product/8.1.6)
  (prespawn_max=25)
  (prespawn_list=
   (prespawn_desc=
    (protocol=tcp)
    (pool_size=4)
    (timeout=5)))))

Modify Configuration for Clients That Are Not to Use Prespawned Dedicated Servers

If you have clients that use SERVICE_NAME in their connect descriptor, replace the value for the SERVICE_NAMES parameter in the initialization parameter file with another value and connect to the new service name. For example, if the initialization parameter file contains service_names=sales.us.acme.com, change sales.us.acme.com to sales2.us.acme.com. Create a connect descriptor that connects to sales2.us.acme.com, as shown in the following:

sales= 
(description= 
  (address=(protocol=tcp)(host=sales-server)(port=1521))
  (connect_data=
    (service_name=sales2.us.acme.com))

If you have clients that use SID in their connect descriptor, replace the value for the INSTANCE_NAME parameter in the initialization parameter file with another value and connect to the new instance. For example, if the initialization parameter file contains instance_name=sales, change sales to sales2. Create a connect descriptor that connects to sales2, as shown in the following:

sales= 
(description= 
  (address=(protocol=tcp)(host=sales-server)(port=1521))
  (connect_data=
    (sid=sales2))


Prev Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index