1. Pros and cons
In practice, both methods are simple to implement and works justfine. However,
there are several differences:
1. With dynamic registration, PMONis the one who register the instance. So if the
instance is down, no registration will be made. Even when the instance is in
nomount, the listener will block access to it. If we need the ability to
remotely connect to the instance when it's down or in nomount in order to startit
or maintain it, we will haveto add static registration.
2. With dynamic registration, PMONis periodically updating the listener with its
registration status. The advantagehere is that we can add data such as workload.
This is irrelevantfor a single instance, but in RAC it is very important and used by
the listener for load balancing.
3. To work with services we need to use dynamic registration.
There are 2 methods to register an instance in the listener, static registration and
dynamic registration. We can work with one of them or both of them combined.
Remember that in order to work with static registration weneed to edit and
maintain the listener.ora file, and in order to work with dynamic registration we
need to set the LOCAL_LISTENERparameter. Another thing to remember is that
the default for dynamic registration is to register to the listener running on the
local host, listening on port1521.
3. )
)
ADR_BASE_LISTENER= /oracle_home/oracle
PFB listener.orafile having dynamic configuration:-
LISTENER=
(DESCRIPTION_LIST=
(DESCRIPTION=
(ADDRESS = (PROTOCOL =TCP)(HOST= 10.11.1.10)(PORT=1521))
(ADDRESS = (PROTOCOL =IPC)(KEY=EXTPROC1521))
)
)
ADR_BASE_LISTENER= /oracle_home/oracle
As we can see dynamic configuration is much easier as compared to static
configuration.
PFB listener statusdetailswhenusing Dynamic regitration:-
4. bash-3.2$ lsnrctlstatus
LSNRCTL for IBM/AIX RISCSystem/6000: Version 11.2.0.1.0 - Production on 02-
DEC-2013 10:51:59
Copyright(c) 1991, 2009, Oracle. Allrights reserved.
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=amit)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNRfor IBM/AIX RISCSystem/6000: Version 11.2.0.1.0 -
Production
Start Date 01-DEC-201316:19:04
Uptime 10 days 18 hr. 32 min. 56 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File
/oracle_home/oracle/ora11g/product/network/admin/listener.ora
Listener Log File
/oracle_home/oracle/diag/tnslsnr/new/listener/alert/log.xml
5. Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amit)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "amit" has 1 instance(s).
Instance"amit", status READY, has 1 handler(s) for this service...
Service "amitXDB" has 1 instance(s).
Instance"amit", status READY, has 1 handler(s) for this service...
The command completed successfully
Abovestatus as "READY" resembles that listener has checked instance details and
found its status as up or running to handle client request.
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=amit)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNRfor IBM/AIX RISCSystem/6000: Version 11.2.0.1.0 -
Production
Start Date 01-DEC-201316:42:04
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
6. Security ON: Local OS Authentication
SNMP ON
Listener Parameter File
/oracle_home/oracle/ora11g/product/network/admin/listener.ora
Listener Log File
/oracle_home/oracle/diag/tnslsnr/new/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amit)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
Abovestatus resembles that either Instanceis not up, or its not been registered
with listener.
PFB commands to register database instancewith listener if it's not automatically
registering with listener :-
SQL> alter systemregister;
Systemaltered.
bash-3.2$ lsnrctlstatus
7. LSNRCTL for IBM/AIX RISCSystem/6000: Version 11.2.0.1.0 - Production on 02-
DEC-2013 11:43:51
Copyright(c) 1991, 2009, Oracle. Allrights reserved.
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=amit)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNRfor IBM/AIX RISCSystem/6000: Version 11.2.0.1.0 -
Production
Start Date 01-DEC-201316:44:04
Uptime 0 days 0 hr. 1 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File
/oracle_home/oracle/ora11g/product/network/admin/listener.ora
Listener Log File
/oracle_home/oracle/diag/tnslsnr/new/listener/alert/log.xml
Listening Endpoints Summary...
8. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amit)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "amit" has 1 instance(s).
Instance"amit", status READY, has 1 handler(s) for this service...
Service "amitXDB" has 1 instance(s).
Instance"amit", status READY, has 1 handler(s) for this service...
The command completed successfully
PFB listener statusdetailswhenusing static registrationalso:-
bash-3.2$ lsnrctlstatus
LSNRCTL for IBM/AIX RISCSystem/6000: Version 11.2.0.1.0 - Production on 02-
DEC-2013 11:50:28
Copyright(c) 1991, 2009, Oracle. Allrights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=
amit)(PORT=1521)))
STATUS of the LISTENER
------------------------
9. Alias LISTENER
Version TNSLSNRfor IBM/AIX RISCSystem/6000: Version 11.2.0.1.0 -
Production
Start Date 01-DEC-201318:10:27
Uptime 0 days 02 hr. 40 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File
/oracle/oracle/ora11g/product/network/admin/listener.ora
Listener Log File /oracle/oracle/diag/tnslsnr/pacs3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amit)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "amit" has 2 instance(s).
Instance"amit", status UNKNOWN, has 1 handler(s) for this service...
Instance"amit", status READY, has 1 handler(s) for this service...
Service "amitXDB" has 1 instance(s).
Instance"amit", status READY, has 1 handler(s) for this service...
The command completed successfully
10. Abovestatus as "UNKNOWN" resembles that listener has not checked instance
status details that whether it's up or not, it has justregistered the details of
instance. So listener is not sure that whether instancecan handle client requestor
not.
Question- What if i configurestatic and dynamic in the same server? Any
problem keeping both ?
Answer - No problem , you can keep both.