9.2.4 Registering Information with All Listeners in a Network
A network may contain multiple local and remote listeners. By default, all listeners are cross-registered with each other. By specifying a set of listeners in the LISTENER_NETWORKS initialization parameter, you can designate a subset of local listeners with a subset of remote listeners. Listeners specified by the LISTENER_NETWORKS parameter should not be specified by the LOCAL_LISTENER and REMOTE_LISTENER parameters.
The syntax of LISTENER_NETWORKS parameter is as follows:
LISTENER_NETWORKS = '((NAME=network_name) (LOCAL_LISTENER=["]listener_address[,...]["]) [(REMOTE_LISTENER=["]listener_address[,...]["])])'
In the preceding syntax, listener_address is resolved according to the rules of LOCAL_LISTENER and REMOTE_LISTENER.
Example 9-3 Using Two Networks on a Subnet
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.
LISTENER_NETWORKS =
'((NAME=network1) (LOCAL_LISTENER=local1) (REMOTE_LISTENER=remote1))',
'((NAME=network2) (LOCAL_LISTENER=local2) (REMOTE_LISTENER=remote2))'
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.
Example 9-4 Configuring Multiple Listeners
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-serverand listens on nondefault port 1421. -
A remote listener named resides on host
sales2-serverand listens on port 1521. -
Another remote listener resides on host
sales3-serverand listens on port 1521.
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-serverandsales3-server), configure thelistener.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 listeners, and the LOCAL_LISTENER parameter to the alias of the local listener.
Set the parameters in the initialization file for the database on host
sales1-serveras follows:REMOTE_LISTENER="listener_sales2,listener_sales3" LOCAL_LISTENER=listener_sales1
-
Resolve the listener name alias for the LOCAL_LISTENER and REMOTE_LISTENER setting through a
tnsnames.orafile on the database host.In the
tnsnames.oraonsales1-server, resolve the local listener alias and remote listener aliaseslistener_sales1,listener_sales2, andlistener_sales3as follows:listener_sales1= (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=sales1-server)(PORT=1421))) listener_sales2= (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=sales2-server)(PORT=1521))) listener_sales3= (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=sales3-server)(PORT=1521))) listener_sales_local= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=salesl-server)(PORT=1421))) listener_sales_remote= (DESCRIPTION_LIST= (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales3-server)(PORT=1521))))
See Also:
-
Oracle Database Reference for additional information about the REMOTE_LISTENER initialization parameter
Parent topic: Configuring Dynamic Service Registration