9.2.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 with Oracle RAC, for dedicated or shared server environments.
In a dedicated server environment, you must enable the LREG background process to register with a remote listener. You do this by configuring the REMOTE_LISTENER parameter, which is a comma-delimited list parameter, in the initialization parameter file. The syntax of REMOTE_LISTENER is as follows:
ALTER SYSTEM SET REMOTE_LISTENER=["]listener_address["][,...];
In the preceding command, listener_address is resolved to the listener protocol addresses through a naming method such as a tnsnames.ora file on the database host. 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. Alternatively, you can set the LISTENER attribute of the DISPATCHERS parameter in the initialization parameter file to register the dispatchers with any listener. The syntax of the LISTENER attribute is as follows:
ALTER SYSTEM SET DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listener_address)";Note:
The LISTENER attribute overrides the REMOTE_LISTENER initialization parameter. Because the REMOTE_LISTENER initialization parameter and the LISTENER attribute enable LREG to register dispatcher information with the listener, you do not need specify both the parameter and the attribute if the listener values are the same.
For example, assume that a remote listener named listener-sales2 listens on port 1521 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 9-1 illustrates this scenario.
See Also:
Oracle Database SQL Reference for additional information about the ALTER SYSTEM SET statement
Example 9-2 shows how to register a remote listener in a dedicated server environment. In the example, the remote listener is sales2-server.
Example 9-2 Registering a Remote Listener in a Dedicated Server Environment
-
On the host where the remote listener resides, use Oracle Net Manager to configure the
listener.orafile with the protocol addresses of the remote listener. -
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:
ALTER SYSTEM SET REMOTE_LISTENER=listener_sales2;
For shared server connections, set the DISPATCHER parameter in the initialization file for the database on host
sales1-serveras follows:ALTER SYSTEM SET DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listeners_sales2)";
Note:
To statically update the REMOTE_LISTENER initialization parameter, use a text editor to de-register the information with the remote listener which it had previously registered information.
-
Resolve the listener name alias for the remote listener through a
tnsnames.orafile on the database host. For example:listener_sales2= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))
See Also:
-
Oracle Database Reference to learn about the REMOTE_LISTENER initialization parameter
-
Oracle Real Application Clusters Administration and Deployment Guide to learn how to configure remote listeners (also called SCAN listeners) in an Oracle RAC environment
Parent topic: Configuring Dynamic Service Registration
