Database Reference
In-Depth Information
SQL> SELECT name, value FROM v$parameter
WHERE name in ('db_domain', 'service_names');
NAME VALUE
------------- ---------------------
db_domain oradbpro.com
service_names taf_inst_svc_net_name
Each instance service name set with the parameter SERVICE_NAMES is registered with one or
more listeners. Note that in a RAC cluster, you need to set the parameter REMOTE_LISTENER to
a Net service name that references all remote nodes in the cluster, such that an instance can
register instance service names with the remote nodes. In case the local listener is not running
on the default port 1521, you must also set the parameter LOCAL_LISTENER . The output of the
command lsnrctl below indicates that the new instance service names were registered with
the listener by both instances, since the constant DBMS_SERVICE.ALL_INSTANCES was used as the
second argument to the procedure DBMS_SERVICE.START_SERVICE .
$ lsnrctl services listener_dbserver1
Services Summary...
Service "taf_inst_svc_net_name.oradbpro.com" has 2 instance(s).
Instance "TEN1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Instance "TEN2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
With this configuration, there is no need to enable TAF on the client side in the configura-
tion file tnsnames.ora . TAF has already been enabled for the instance service name taf_inst_
svc_net_name.oradbpro.com , such that the Net service name taf_net_svc.oradbpro.com shown
next does not contain a FAILOVER_MODE section. Server-side TAF settings override client-side
TAF settings. Note that the network name, which was passed to DBMS_SERVICE (suffixed by the
database domain name), is used as the SERVICE_NAME in tnsnames.ora .
taf_net_svc.oradbpro.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host=dbserver1)(Port= 1521))
(CONNECT_DATA = (SERVICE_NAME = taf_inst_svc_net_name.oradbpro.com))
)
Session Disconnection with DBMS_SERVICE and TAF
Now it's time to test session disconnection with DBMS_SERVICE for the purpose of maintenance
or load rebalancing. Connect as APP_USER using the Net service name in the previous section
and run a SELECT statement.
 
Search WWH ::




Custom Search