Net8 Administrator's Guide Release 8.1.6 Part Number A76933-01 |
|
This chapter describes how to configure the listener. It includes the following sections:
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:
listener.ora
file.
listener.ora
file.
Once the listener is configured, the listener may be managed with the Listener Control Utility (LSNRCTL).
This section covers the following additional configuration topics:
The listener has a default name of LISTENER and is configured to listen on the following default protocol addresses:
(address=(protocol=tcp)(host=host_name)(port=1521))
(address=(protocol=ipc)(key=PNPKEY))
Clients configured with these addresses can connect to the listener.
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.
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)))
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:
See Also:
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:
|
To configure other, non-default protocol listener addresses:
If a
Note:
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:
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.
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.
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))
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:
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))))
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.
The LOCAL_LISTENER parameter should be configured as follows in the initialization parameter file:
local_listener=listener_name_alias
The listener name alias specified for the LOCAL_LISTENER parameter must be resolved through a one of the following naming methods:
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))
An entry for the listener alias name can be made to an Oracle Names server through Net8 Assistant:
(address=(protocol= tcp)(host= sales-server)(port= 2481))
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))
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:
See Also:
|
To statically configure the listener:
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)))
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.
The listener.ora
file can be configured with the prespawned dedicated server parameters described in the following table:
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:
To configure prespawned dedicated servers in the listener.ora
file:
The Configure Prespawned Servers dialog box appears:
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)))))
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))
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|