Skip Headers
Oracle® Database Net Services Administrator's Guide
11g Release 1 (11.1)

B28316-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

10 Configuring and Administering Oracle Net Listener

Oracle Net Listener is a separate process that runs on the database server computer. It receives incoming client connection requests and manages the traffic of these requests to the database server. This chapter describes how to configure the listener to accept client connections.

This chapter includes the following topics:

10.1 Oracle Net Listener Configuration Overview

Note:

The version of the listener must be the same as or higher than the highest version of all Oracle databases being serviced through the listener.

A listener is configured with one or more listening protocol addresses, information about supported services, and parameters that control its run-time behavior. The listener configuration is stored in a configuration file named listener.ora.

Because all of the configuration parameters have default values, it is possible to start and use a listener with no configuration. This default listener has a name of LISTENER, supports no services on startup, and listens on the following TCP/IP protocol address:

(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1521))

Supported services, that is, the services to which the listener forwards client requests, can be configured in the listener.ora file or this information can be dynamically registered with the listener. This dynamic registration feature is called service registration. The registration is performed by the PMON process—an instance background process—of each database instance that has the necessary configuration in the database initialization parameter file. Dynamic service registration does not require any configuration in the listener.ora file.

Service registration offers the following benefits:

10.2 Oracle Net Listener Configuration During Installation

Oracle Universal Installer launches Oracle Net Configuration Assistant during software installation. Oracle Net Configuration Assistant configures the listening protocol address and service information for Oracle Database.

During an Enterprise Edition or Standard Edition installation on the database server, Oracle Net Configuration Assistant automatically configures a listener with a name of LISTENER that has a TCP/IP listening protocol address for Oracle Database. During a Custom installation, Oracle Net Configuration Assistant prompts you to configure a listener name and a protocol address of your choice.

Additionally, a listening IPC protocol address for external procedure calls is automatically configured, regardless of the installation type.

Oracle Net Configuration Assistant also automatically configures service information for the external procedures in the listener.ora file.

Example 10-1 shows a sample listener.ora file. The LISTENER entry defines the listening protocol address for a listener named LISTENER, and the SID_LIST_LISTENER entry provides information about the services statically supported by the listener LISTENER.

Example 10-1 Example listener.ora File

LISTENER=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
      (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (SID_NAME=plsextproc)
      (ORACLE_HOME=/oracle10g)
      (PROGRAM=extproc)))

If you are using the IPC protocol, you can improve performance by specifying the maximum number of concurrent IPC connection requests to match your expected connection requests. In listener.ora for example, you can specify the value as in the following example:

listener_name=(description=(address=(protocol=ipc)(key=listener0)(queuesize=50)))

See Also:

Oracle Database Net Services Reference for further information about identifying listeners by unique names and creating multiple listener entries in the listener.ora file

10.3 Customizing Oracle Net Listener Configuration

If the default or installed configuration is not adequate for a particular environment, you can use Oracle Net Manager to customize the listener.ora configuration.

This section contains these configuration topics:

10.3.1 Configuring Listening Protocol Addresses

To configure additional protocol addresses for the listener, use Oracle Enterprise Manager:

  1. Access the Net Services Administration page in Oracle Enterprise Manager.

  2. Select Listeners from the Administer list, and then select the Oracle home that contains the location of the configuration files.

  3. Click Go.

    The Listeners page appears.

  4. Select a listener, and then click Edit.

    The Edit Listener page appears.

  5. In the Addresses section, configure protocol support:

    1. Click Add.

      The Add Address page appears.

    2. From the Protocol list, select the protocol on which the listener is configured to listen.

    3. Enter the appropriate parameter information for the selected protocol in the fields provided.

      When configuring the listener to listen on TCP/IP, you should enter the default port of 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:

      If the computer 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 computer in the Host field.

    4. Optionally, in the Advanced Parameters section, specify the I/O buffer space limit for send and receive operations of sessions in the Total Send Buffer Size and Total Receive Buffer Size fields.

      See Also:

      "Configuring I/O Buffer Space" for further information
    5. Click OK.

      The protocol address is added to the Addresses section.

  6. Repeat Step 5 for additional protocols.

    Note:

    You can also configure additional listening addresses with Oracle Net Manager. See the online Help for further instruction.

10.3.2 Handling Large Volumes of Concurrent Connection Requests

If you expect the listener to handle large volumes of concurrent connection requests, then you can specify a listener queue size for its TCP/IP or IPC listening endpoints. To specify the listener queue size, specify the QUEUESIZE parameter at the end of the protocol address with its value set to the expected number of concurrent requests, similar to Example 10-2.

Example 10-2 listener.ora File with Queue Size

LISTENER=
 (DESCRIPTION=
  (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)(QUEUESIZE=20)))

Note:

The default number of concurrent connection requests is operating system-specific. The defaults for TCP/IP on the Solaris Operating System and Windows follow:
  • Solaris Operating System: 5

  • Windows XP Professional SP2: 10

  • Windows 2003 Server Enterprise Edition: 200

10.3.3 Configuring Static Service Information

The listener uses the dynamic service information about the database and instance it has received through service registration before using statically configured information in the listener.ora file.

Static configuration is also required for other services, such as external procedures, Heterogeneous Services.

Table 10-1 describes static service settings that you can set in the listener.ora file.

Table 10-1 Static Service Settings in listener.ora

Oracle Net Manager Field listener.ora File Parameter Description

SID

SID_NAME

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

Service Name

GLOBAL_DBNAME

Identifies the database service.

While processing a client connection request, the listener tries to match the value of this parameter with the value of the SERVICE_NAME parameter in the client connect descriptor. If the client connect descriptor uses the SID parameter, then the listener does not attempt to map the values. This parameter is primarily intended for configurations with Oracle8 release 8.0 databases (where dynamic service registration is not supported for dedicated servers). This parameter may also be required for use with Oracle8i and higher database services by some configurations.

The value for this parameter is typically obtained from the combination of the DB_NAME and DB_DOMAIN parameters (DB_NAME.DB_DOMAIN) in the initialization parameter file, but the value can also contain any valid name used by clients to identify the service.

Oracle Home Directory

ORACLE_HOME

On UNIX, this setting is optional. Use it to specify the Oracle home location of the instance. Without this setting, the listener assumes its Oracle home for the instance.

On Windows, this setting is ignored. The Oracle home specified by the ORACLE_HOME parameter in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID of the Windows registry is used.


Important:

If you are using connect-time failover or Transparent Application Failover (TAF), such as in an Oracle Real Application Clusters environment, then do not set the GLOBAL_DBNAME parameter.

See Also:

To statically configure the listener:

  1. Access the Net Services Administration page in Oracle Enterprise Manager.

  2. Select Listeners from the Administer list, and then select the Oracle home that contains the configuration files.

  3. Click Go.

    The Listeners page appears.

  4. Select a listener, and then click Edit.

    The Edit Listener page appears.

  5. Click the Static Database Registration tab, and then click Add.

    The Add Database Service page appears. Enter the required information in the fields.

    See Also:

    Table 10-1, "Static Service Settings in listener.ora" for a description of the fields
  6. Click OK.

    Note:

    You can also configure static service information with Oracle Net Manager. See topic Statically Configure Database Service Information in the online Help for further instruction.

    The following example shows an excerpt of a listener.ora file statically configured for a database service called sales.us.example.com:

    SID_LIST_listener=
    (SID_LIST=
     (SID_DESC=
      (GLOBAL_DBNAME=sales.us.example.com)
      (SID_NAME=sales)
      (ORACLE_HOME=/u01/app/oracle/11g)))
    

10.3.4 Default Oracle Net Listener Administration

By default, Oracle Net Listener permits only local administration for security reasons. Additionally, as a policy, the listener can be administered only by the user who started it and this is enforced through local operating system authentication. So, if user1 starts the listener, only user1 can administer it, and any other user trying to administer it would get an error. The superuser is the only exception.

Oracle recommends that only local administration be allowed for the listener. However, in case a user wants to administer the listener remotely or a different user must administer the listener, either COST parameters or passwords can be used.

This section includes the following topics:

10.3.4.1 Using COST Parameters and Other Secure Transports

The security of a particular transport depends on the characteristics of the network on which it is used. If you are administering the listener remotely over an insecure network and require maximum security, you can configure the listener with a secure protocol address that uses the TCP/IP with SSL protocol. If the listener has multiple protocol addresses, ensure that the TCP/IP with SSL protocol address is listed first in the listener.ora file.

The class of secure transports (COST) parameters provide a way to specify the list of transports that are considered secure and can be used for listener administration. Using the COST parameters does not affect any connections other than registration and control.

The COST parameters identify two conditions: which transports are considered secure for that installation and whether the administration of a that listener requires secure transports.

See Also:

Oracle Database Net Services Reference for detailed descriptions of each of the four COST parameters.

10.3.4.2 Configuring Passwords for Oracle Net Listener

Oracle Net Listener Control (lsnrctl) is the command-line utility for managing Oracle Net Listener configuration, including passwords. A password can be configured for the listener to provide security for listener administrative operations, such as starting or stopping the listener, viewing a list of supported services, or saving changes to the Listener Control configuration. However, as mentioned earlier, local administration of the listener is secure by default through the local operating system. Therefore configuring a password is neither required nor recommended for secure local administration.

10.3.4.3 Changing the Oracle Net Listener Password

To change the listener password, use the Listener Control utility's CHANGE_PASSWORD command or Oracle Enterprise Manager to set or modify an encrypted password in the PASSWORDS_listener_name parameter in the listener.ora file. If the PASSWORDS_listener_name parameter is set to an unencrypted password, you must manually remove it from the listener.ora file prior to modifying it. If the unencrypted password is not removed, you will be unable to successfully set an encrypted password.

To set or modify an encrypted password with Oracle Enterprise Manager:

  1. Access the Net Services Administration page in Oracle Enterprise Manager.

  2. Select Listeners from the Administer list, and then select the Oracle home that contains the location of the configuration files.

  3. Click Go.

    The Listeners page appears.

  4. Select a listener, and then click Edit.

    The Edit Listeners page appears.

  5. Click the Authentication tab.

  6. Click Require a password for listener operations.

  7. Click OK.

    Note:

    You can also configure static service information with Oracle Net Manager. See topic Configure Password Authentication for the Listener in the online Help for further instruction.

To set a new encrypted password with the CHANGE_PASSWORD command, issue the following commands from the Listener Control utility:

LSNRCTL> CHANGE_PASSWORD
Old password: old_password
New password: new_secure_password
Reenter new password: new_secure_password
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tpc)(HOST=sales-server)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> SAVE_CONFIG

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File   /oracle/network/admin/listener.ora
Old Parameter File   /oracle/network/admin/listener.bak
The command completed successfully

Bold denotes user input. The password is not displayed when entered.

To modify an encrypted password with the CHANGE_PASSWORD command:

LSNRCTL> SET PASSWORD
Password: password
The command completed successfully
LSNRCTL> CHANGE_PASSWORD
Old password: old_password
New password: new_secure_password
Reenter new password: new_secure_password
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tpc)(HOST=sales-server)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> SAVE_CONFIG
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales-server)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File   /oracle/network/admin/listener.ora
Old Parameter File   /oracle/network/admin/listener.bak
The command completed successfully

See Also:

10.4 Configuring Service Registration

Service registration allows processes, such as an Oracle database, to identify their available services to the listener, which then acts as a portmapper for those services. The listener uses the dynamic service information about the database and instance it has received through service registration before using statically configured information in the listener.ora file. The listener uses the dynamic service information about the database and instance it has received through service registration before using statically configured information in the listener.ora file.

Dynamic service registration is configured in the database initialization file. It does not require any configuration in the listener.ora file. However, listener configuration must be synchronized with the information in the database initialization file.

This section contains the following configuration topics related to service registration:

10.4.1 Configuring Service Registration

To ensure service registration works properly, the initialization parameter file should contain the following parameters:

  • SERVICE_NAMES for the database service name

  • INSTANCE_NAME for the instance name

For example:

SERVICE_NAMES=sales.us.example.com
INSTANCE_NAME=sales

The value for the SERVICE_NAMES parameter defaults to the global database name, a name comprising the DB_NAME and DB_DOMAIN parameters in the initialization parameter file, entered during installation or database creation. The value for the INSTANCE_NAME parameter defaults to the SID entered during installation or database creation.

See Also:

Oracle Database Reference for further information about the SERVICE_NAMES and INSTANCE_NAME parameters

10.4.2 Registering Information with a Local Listener

As explained in "Oracle Net Listener Configuration Overview", the default local listener is named LISTENER and listens using TCP/IP on port 1521. You can register information using the default or with a nondefault local listener.

10.4.2.1 Registering Information with the Default Local Listener

By default, the PMON process registers service information with its local listener on the default local address of TCP/IP, port 1521. As long as the listener configuration is synchronized with the database configuration, PMON can register service information with a nondefault local listener or a remote listener on another node. Synchronization is simply a matter of specifying the protocol address of the listener in the listener.ora file and the location of the listener in the initialization parameter file.

10.4.2.2 Registering Information with a Nondefault Local Listener

If you want PMON to register with a local listener that does not use TCP/IP, port 1521, then configure the LOCAL_LISTENER parameter in the initialization parameter file to locate the local listener.

For a shared server environment, you can alternatively use the LISTENER attribute of the DISPATCHERS parameter in the initialization parameter file to register the dispatchers with a nondefault local listener. Because both the LOCAL_LISTENER parameter and the LISTENER attribute enable PMON to register dispatcher information with the listener, it is not necessary to specify both the parameter and the attribute if the listener values are the same.

Set the LOCAL_LISTENER parameter as follows:

LOCAL_LISTENER=listener_alias

Set the LISTENER attribute as follows:

DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listener_alias)"

listener_alias is then resolved to the listener protocol addresses through a naming method, such as a tnsnames.ora file on the database server.

For example, if the listener is configured to listen on port 1421 rather than port 1521, you can set the LOCAL_LISTENER parameter in the initialization parameter file as follows:

LOCAL_LISTENER=listener1

Using the same listener example, you can set the LISTENER attribute as follows:

DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listener1)"

You can then resolve listener1 in the local tnsnames.ora as follows:

listener1= 
 (DESCRIPTION= 
  (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1421)))

Notes:

  • To dynamically update the LOCAL_LISTENER parameter, use the SQL statement ALTER SYSTEM:

    ALTER SYSTEM SET LOCAL_LISTENER='listener_alias'
    

    If you set the parameter to null with the statement that follows, then the default local address of TCP/IP, port 1521 is assumed.

    ALTER SYSTEM SET LOCAL_LISTENER=''
    

    See the Oracle Database SQL Language Reference for further information about the ALTER SYSTEM statement.

  • The LISTENER attribute overrides the LOCAL_LISTENER parameter. As a result, the SQL statement ALTER SYSTEM SET LOCAL_LISTENER does not affect the setting of this attribute.

To register information with another local listener:

  1. Configure the listener.ora file with the protocol address of the local listener.

  2. Configure the LOCAL_LISTENER parameter in the initialization parameter file to locate the local listener.

    If you are using shared server, then you can also use the LISTENER attribute of the DISPATCHERS parameter in the initialization parameter file.

  3. Resolve the listener name alias for the LOCAL_LISTENER or the LISTENER setting through a tnsnames.ora file.

10.4.3 Registering Information with a Remote Listener

A remote listener is a listener residing on one computer that redirects connections to a database instance on another computer. Remote listeners are typically used in an Oracle Real Application Clusters (Oracle RAC) environment. You can configure registration to remote listeners, such as in the case of Oracle RAC, for dedicated server or shared server environments.

10.4.3.1 Registering Information with a Remote Listener in a Dedicated Server Environment

In a dedicated server environment, you must enable the PMON background process to register with a remote listener. You achieve this goal by configuring the REMOTE_LISTENER parameter in the initialization parameter file. The syntax of the REMOTE_LISTENER initialization parameter is as follows:

REMOTE_LISTENER=listener_alias

listener_alias is resolved to the listener protocol addresses through a naming method such as a tnsnames.ora file on the database host.

To dynamically update the REMOTE_LISTENER initialization parameter, use the SQL statement ALTER SYSTEM SET. If you set the parameter to null with the statement that follows, then PMON de-registers information with the remote listener with which it had previously registered information, as in the following example:

ALTER SYSTEM SET REMOTE_LISTENER=''

See Also:

Oracle Database SQL Language Reference for further information about the ALTER SYSTEM SET statement

To register information with a remote listener in a dedicated server environment:

  1. On the host where the remote listener resides, configure the listener.ora file with the protocol addresses of the remote listener.

    For example, assume that a remote listener listens on port 1521 on host sales2-server.

  2. On the database to which you want requests to be redirected, set the REMOTE_LISTENER parameter in the database initialization parameter file to the alias of the remote listener.

    For example, suppose that a database resides on host sales1-server. To redirect requests to the database on sales1-server, you can set the REMOTE_LISTENER parameter in the initialization file for the database on host sales1-server as follows:

    REMOTE_LISTENER=listener_sales2
    
  3. Resolve the listener name alias for the REMOTE_LISTENER setting through a tnsnames.ora file on the database host.

    For example, in the tnsnames.ora on sales1-server, you can resolve the remote listener alias listener_sales2 as follows:

    listener_sales2= 
     (DESCRIPTION= 
       (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))
    

See Also:

10.4.3.2 Registering Information with a Remote Listener in a Shared Server Environment

In a shared server environment, you can use the same registration technique as for a dedicated server environment. Alternatively, you can set the LISTENER attribute of the DISPATCHERS parameter in the initialization parameter file to register the dispatchers with any listener.

The LISTENER attribute overrides the REMOTE_LISTENER parameter. Because the REMOTE_LISTENER parameter and the LISTENER attribute enable PMON to register dispatcher information with the listener, you need not specify both the parameter and the attribute if the listener values are the same.

The syntax of the LISTENER attribute is as follows:

DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listener_alias)"

To register information with a remote listener in a shared server environment:

  1. On the host where the remote listener resides, configure the listener.ora file with the protocol addresses of the remote listener.

    For example, assume that a remote listener listens on port 1521 on host sales2-server.

  2. On the database to which you want requests to be redirected, configure the LISTENER attribute of the DISPATCHERS parameter.

    For example, suppose that a database resides on host sales1-server. To redirect requests to the database on sales1-server, set the DISPATCHER parameter in the initialization file for the database on host sales1-server as follows:

    DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listeners_sales2)"
    
  3. Resolve the listener name alias for the LISTENER attribute through a tnsnames.ora file on the database host.

    For example, in the tnsnames.ora on sales1-server, you can resolve the remote listener alias listener_sales2 as follows:

    listeners_sales2= 
     (DESCRIPTION= 
       (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))
    

    See Also:

    Oracle Database Reference to learn about the DISPATCHERS initialization parameter

10.4.4 Configuring a Naming Method

The listener name alias specified for the LOCAL_LISTENER parameter, REMOTE_LISTENER parameter, or LISTENER attribute can be resolved through a tnsnames.ora file.

A net service name entry should be created for the protocol address without the CONNECT_DATA section of the connect descriptor. Oracle Enterprise Manager and Oracle Net Manager does not enable you to configure a tnsnames.ora file without the CONNECT_DATA information. Therefore, Oracle recommends that you manually modify the tnsnames.ora file.

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

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.

See Also:

Chapter 13, "Enabling Advanced Features of Oracle Net Services" for further information about multiple address configuration

10.5 Listener Administration

Once the listener is configured, the listener can be administered with the Listener Control utility or Oracle Enterprise Manager. This section describes some of the common administrative tasks for the listener, including the following topics:

10.5.1 Starting and Stopping a Listener

To stop or start a listener, use either the Listener Control utility or Oracle Enterprise Manager.

Note:

You can configure the listener to start automatically whenever the computer it is running on is restarted. See your operating system-specific documentation for details about establishing auto-restart.

Using the Listener Control Utility to Start or Stop a Listener

To stop a listener from the command line, enter:

lsnrctl 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.

To start the listener from the command line, enter:

lsnrctl START [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.

In addition to starting the listener, the Listener Control utility verifies connectivity to the listener.

Using Oracle Enterprise Manager to Start or Stop a Listener

To start or stop a listener from Oracle Enterprise Manager:

  1. Access the Net Services Administration page in Oracle Enterprise Manager.

  2. Select Listeners from the Administer list, and then select the Oracle home that contains the location of the configuration files.

  3. Click Go.

    The Listeners page appears.

  4. Select a listener.

  5. From the Actions list, select Start/Stop.

    The Start/Stop page appears.

  6. Depending upon the current status of the selected listener, the operation will be either Stop or Start. Click OK to perform the operation.

10.5.2 Determining the Current Status of a Listener

To show the current status of a listener, use either the STATUS command of the Listener Control utility or Oracle Enterprise Manager. The status output provides basic status information about a listener, a summary of listener configuration settings, the listening protocol addresses, and a summary of services registered with the listener.

Using the Listener Control Utility to Determine the Listener Status

The STATUS command provides basic status information about a listener, including a summary of listener configuration settings, the listening protocol addresses, and a summary of services registered with the listener.

To show the status the listener from the command line, enter:

lsnrctl STATUS [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.

Using Oracle Enterprise Manager to Determine the Listener Status

To show the status of a listener from Oracle Enterprise Manager:

  1. Access the Net Services Administration page in Oracle Enterprise Manager.

  2. Select Listeners from the Administer list, and then select the Oracle home that contains the location of the configuration files.

  3. Click Go.

    The Listeners page appears.

  4. Select a listener.

  5. From the Actions list, select Show Listener Control Status.

    The Listener Control Status page appears.

  6. After viewing the content, click OK.

The STATUS command generates output with the sections described in Table 10-2.

Table 10-2 Listener Control Utility STATUS Command

Output Section Description

STATUS of the LISTENER

Specifies the following:

  • Alias of the listener

  • Version of listener

  • Start time and up time

  • Tracing level

  • Whether the listener can respond to queries from an SNMP-based network management system

  • listener.ora file being used

  • Logging and tracing configuration settings

  • Whether a password is set in listener.ora file

Listening Endpoints Summary

Lists the protocol addresses the listener is configured to listen on

Services Summary

Displays a summary of the services registered with the listener and the service handlers allocated to each service

Service

Identifies the registered service

Instance

Specifies the name of the instance associated with the service along with its status and number of service handlers associated with the service

Status can be one of the following:

  • A READY status means that the instance can accept connections.

  • A BLOCKED status means that the instance cannot accept connections.

  • A READY/SECONDARY status means that this is a secondary instance in an Oracle Real Application Clusters primary/secondary configuration and is ready to accept connections.

  • An UNKNOWN status means that the instance is registered statically in the listener.ora file rather than dynamically with service registration. Therefore, the status is not known.


Example 10-3 shows example output of the STATUS command.

Example 10-3 Listener Control Utility's STATUS Command Output

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=net)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 10.1.0.2.0
Start Date                15-NOV-2006 20:22:00
Uptime                    0 days 0 hr. 5 min. 22 sec
Trace Level               support
Security                  OFF
SNMP                      OFF
Listener Parameter File   /oracle/admin/listener.ora
Listener Log File         /oracle/network/log/listener.log
Listener Trace File       /oracle/network/trace/listener.trc
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=net)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=sales-server)(PORT=2484)))
 
Services Summary...
Service "sales.us.example.com" has 1 instance(s).
  Instance "sales", status READY, has 3 handler(s) for this service...
Service "hr.us.example.com" has 1 instance(s).
  Instance "hr", status READY, has 2 handler(s) for this service...
The command completed successfully

10.5.3 Monitoring Services of a Listener

The SERVICES command of the Listener Control utility provides detailed information about the services and instances registered with a listener and the service handlers allocated to each instance.

The SERVICES command generates output with the sections described in Table 10-3.

Table 10-3 Listener Control Utility SERVICES Command

Output Section Description

Service

Identifies the registered service

Instance

Specifies the name of the instance associated with the service

 

The status field indicates if the instance is able to accept connections.

  • A READY status means that the instance can accept connections.

  • A BLOCKED status means that the instance cannot accept connections.

  • A READY/SECONDARY status means that the is a secondary instance in an Oracle Real Application Clusters primary/secondary configuration and is ready to accept connections.

  • A RESTRICTED status means that the instance is in restricted mode. The listener blocks all connections to this instance.

  • An UNKNOWN status means that the instance is registered statically in the listener.ora file rather than dynamically with service registration. Therefore, the status is non known.

Handlers

Identifies the name of the service handler. Dispatchers are named D000 through D999. Dedicated servers have a name of DEDICATED.

This section also identifies the following about the service handler:

  • established: The number of client connections this service handler has established

  • refused: The number of client connections it has refused

  • current: The number of client connections it is handling, that is, its current load

  • max: The maximum number of connections for the service handler, that is, its maximum load

  • state: The state of the handler:

    - A READY state means that the service handler can accept new connections.

    - A BLOCKED state means that the service handler cannot accept new connections.

Following this, additional information about the service handler displays, such as whether the service handler is a dispatcher, a local dedicated server, or a remote dedicated server on another node.


Example 10-4 shows example output of the SERVICES command.

Example 10-4 Listener Control Utility's SERVICES Command Output

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=net)))
Services Summary...
Service "sales.us.example.com" has 1 instance(s).
  Instance "sales", status READY, has 3 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
      "D000" established:0 refused:0 current:0 max:10000 state:ready
         DISPATCHER <machine: sales-server, pid: 1689>
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=52414))
      "D001" established:0 refused:0 current:0 max:10000 state:ready
         DISPATCHER <machine: sales-server, pid: 1691>
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=52415))
Service "hr.us.example.com" has 1 instance(s).
  Instance "hr", status READY, has 2 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
      "D000" established:0 refused:0 current:0 max:10000 state:ready
         DISPATCHER <machine: sales-server, pid: 11326>
         (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=58361))
The command completed successfully

This output shows that two database services, sales.us.example.com and hr.us.example.com, are registered with the listener.

Client connection requests to sales.us.example.com are handled by two dispatchers named D000 and D001 and one dedicated server. All handlers have a status of ready, indicating that they are ready to receive connections.

Client connection requests to hr.us.example.com are handled by one dispatcher named D001 and one dedicated server.

10.5.4 Monitoring Listener Log Files

When you notice any of the following conditions, review and monitor the listener log file for the following:

  • Long connection establishment times

  • Connectivity problems and refusals

  • Unexpected shutdown of the listener that could indicate a denial-of-service attack