How do oracle listeners work




















Notice the reference to the hostname "myserver. If this is incorrect, the listener will not function correctly. After the "listener. The listener defined above doesn't have any services defined. These are created when database instances auto-register with it. In some cases you may want to manually configure services, so they are still visible even when the database instance is down. If this is the case, you may use a "listener. The "tnsnames.

This file will also be present on the server if client style connections are used on the server itself. Here is an example of a "tnsnames.

The alias used at the start of the entry can be whatever you want. In a dedicated server environment, you must enable the LREG background process to register with a remote listener. If a comma appears in the listener address, then the entire string must be enclosed in quotation marks. In a shared server environment, you can use the same registration technique as for a dedicated server environment.

For example, assume that a remote listener named listener-sales2 listens on port on host sales2-server , and a database resides on host sales1-server. You want the listener on sales2-server to redirect connection requests to this database. Figure illustrates this scenario.

Example shows how to register a remote listener in a dedicated server environment. In the example, the remote listener is sales2-server. On the host where the remote listener resides, use Oracle Net Manager to configure the listener.

Resolve the listener name alias for the remote listener through a tnsnames. A network may contain multiple local and remote listeners. By default, all listeners are cross-registered with each other. Assume there are two distinct networks, network1 and network2. On network1 , there is a local listener named local1 , and a remote listener named remote1. On network2 , there is a local listener named local2 , and a remote listener named remote2.

The following syntax sets up registration so that the listeners only redirect connections to listeners on the same network. In the preceding example, local1 is registered only with remote1 , and remote1 only redirects connections to local1. The listener local2 is registered only with remote2 , and remote2 only redirects connections to local2.

Assume that multiple listeners are listening on a network named sales-network. The following conditions are true:. A database configured for dedicated server connections resides on host sales1-server. It is the only database in the network. A local listener resides on sales1-server and listens on nondefault port A remote listener named resides on host sales2-server and listens on port Another remote listener resides on host sales3-server and listens on port The following procedure describes how to register information with all listeners in a dedicated server environment:.

On the hosts where the remote listeners reside in this example, sales2-server and sales3-server , configure the listener. Set the parameters in the initialization file for the database on host sales1-server as follows:. In the tnsnames. For example, a listener can be defined in the init.

To use an alias for the listener, it can be defined in the init. To use listener name aliases, Oracle recommends you modify the tnsnames. Multiple addresses are supported, but connect-time failover and client load balancing features are not supported. The following errors occur:. Enabling Advanced Features of Oracle Net Services for additional information about multiple address configuration.

Oracle Net Configuration Assistant configures the listening protocol address and service information for Oracle Database. During a Custom installation, Oracle Net Configuration Assistant prompts for the listener name and protocol address.

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.

If you are using the IPC protocol, then you can improve performance by specifying the maximum number of concurrent IPC connection requests to match your expected connection requests.

If the default or installed configuration is not adequate for a particular environment, then you can use Oracle Net Manager to customize the listener. This technique can create listening endpoints that service IPv6 clients. The following procedure describes how to configure protocol addresses for the listener using Oracle Enterprise Manager Cloud Control:.

Repeat Step 3 for additional protocols. Parent topic: Configuring Listening Protocol Addresses. The following procedure describes how to configure protocol addresses for the listener using Oracle Net Manager:. In the navigator pane, expand Local , and then select Listeners.

If you want to set send and receive buffer sizes, then click Show Advanced , and then enter the sizes in the appropriate fields. Select Save Network Configuration from the File menu to save the changes. The default number of concurrent connection requests is operating system-specific. By default, Oracle Net Listener permits only local administration for security reasons.

As a policy, the listener can be administered only by the user who started it. This is enforced through local operating system authentication. For example, if user1 starts the listener, then only user1 can administer it. Any other user trying to administer the listener gets an error.

The super user is the only exception. Oracle recommends that you perform listener administration in the default mode secure by means of local operating system authentication , and access the system remotely using a remote login.

Oracle Enterprise Manager Cloud Control can also be used for remote administration. If no ACLs are configured for a service, all connections are rejected for that service. If ACL is configured for a service, validation is done for that service. In the absence of ACLs, no validation is done and all connections for that service are accepted.

You can use all of these commands to control the listener. The output shows the status of the listener such as alias, version, start date, uptime, trace file, security, listener parameter files listener log files and listening endpoint summary. Once the listener stop listening, you cannot connect to the Oracle Database anymore. Any attempt to connect to the Oracle Database will result in the following error:.

Note that all connections established before the listener stopped will be unaffected. Because stopping the listener prevents the incoming connections, it does not disconnect those that are already connected.



0コメント

  • 1000 / 1000