According to Oracle Net, the database server may also be a client, because tnsnames. ora can have a server description. That is, only the listener will always be a server.
Instance: Listener = n: m
(I) benefits of dual listeners:
① Client Failover-CF
② Client Server Load balancer-CLB
(Ii) Notes:
① Ensure port 1521 is available; otherwise, OEM will be unavailable and emca must be reconfigured
② Static registration for non-standard ports is a good practice
Configuration case:
[Oracle @ localhost admin] $ cat listener. ora
Think =
(DESCRIPTION =
(Load_balance = on)
(Failover = on)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.113) (PORT = 1521)
(ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.113) (PORT = 1522)
)
)
)
SID_LIST_think =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = emrep.us.oracle.com)
(SID_NAME = emrep)
(ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1 )))
Water =
(DESCRIPTION =
(Load_balance = on)
(Failover = on)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.113) (PORT = 1521 ))
(ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.113) (PORT = 1522 ))
)
)
)
SID_LIST_water =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = emrep.us.oracle.com)
(SID_NAME = emrep)
(ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1 )))
[Oracle @ localhost admin] $ lsnrctl status water
LSNRCTL for Linux: Version 10.2.0.1.0-Production on 10-DEC-2012 21:47:22
Copyright (c) 1991,200 5, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (load_balance = on) (failover = on) (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.113) (PORT = 1521 )))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0-Production
Start Date 10-DEC-2012 20:02:23
Uptime 0 days 1 hr. 44 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/10.2.0/db_1/network/admin/listener. ora
Listener Log File/u01/app/oracle/product/10.2.0/db_1/network/log/listener. log
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost. localdomain) (PORT = 1521 )))
Services Summary...
Service "emrep.us.oracle.com" has 1 instance (s ).
Instance "emrep", status READY, has 1 handler (s) for this service...
Service "emrep_XPT.us.oracle.com" has 1 instance (s ).
Instance "emrep", status READY, has 1 handler (s) for this service...
The command completed successfully
If 1521 and 1522 coexist, the listener process only uses 1521
[Oracle @ localhost admin] $ lsnrctl status water
LSNRCTL for Linux: Version 10.2.0.1.0-Production on 10-DEC-2012 21:48:45
Copyright (c) 1991,200 5, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (load_balance = on) (failover = on) (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.113) (PORT = 1522 )))
STATUS of the LISTENER
------------------------
Alias water
Version TNSLSNR for Linux: Version 10.2.0.1.0-Production
Start Date 10-DEC-2012 21:24:17
Uptime 0 days 0 hr. 24 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/10.2.0/db_1/network/admin/listener. ora
Listener Log File/u01/app/oracle/product/10.2.0/db_1/network/log/water. log
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.1.113) (PORT = 1522 )))
Services Summary...
Service "emrep.us.oracle.com" has 1 instance (s ).
Instance "emrep", status UNKNOWN, has 1 handler (s) for this service...
The command completed successfully