Вы находитесь на странице: 1из 10

Pros and cons

In practice, both methods are simple to implement and works just


fine. However, there are several differences:

1. With dynamic registration, PMON is 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 start it or
maintain it, we will have to add static registration.
2. With dynamic registration, PMON is periodically updating the
listener with its registration status. The advantage here is that we
can add data such as workload. This is irrelevant for 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 we need to edit and maintain the
listener.ora file, and in order to work with dynamic registration we
need to set the LOCAL_LISTENER parameter. Another thing to
remember is that the default for dynamic registration is to
register to the listener running on the local host, listening on port
1521.

Difference between Static listener and


Dynamic listener registrations
PFB listener.ora file having static configuration :-

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = AMIT)
(ORACLE_HOME = /oracle_home/oracle/ora11g/product)
)
(SID_DESC =
(SID_NAME = TEST)
(ORACLE_HOME = /oracle_home/oracle/ora11g/product)
)
)

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

PFB listener.ora file 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 status details when using Dynamic regitration


:-

bash-3.2$ lsnrctl status

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 Production on 02-DEC-2013 10:51:59

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
(HOST=amit)(PORT=1521)))
STATUS of the LISTENER
-----------------------Alias

LISTENER

Version
TNSLSNR for IBM/AIX RISC System/6000:
Version 11.2.0.1.0 - Production
Start Date

01-DEC-2013 16: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

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

Above status 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
TNSLSNR for IBM/AIX RISC System/6000:
Version 11.2.0.1.0 - Production
Start Date

01-DEC-2013 16:42:04

Uptime

0 days 0 hr. 0 min. 0 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...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amit)
(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)
(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

Above status resembles that either Instance is not up, or its not
been registered with listener.

PFB commands to register database instance with listener if it's


not automatically registering with listener :-

SQL> alter system register;

System altered.

bash-3.2$ lsnrctl status

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 Production on 02-DEC-2013 11:43:51

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
(HOST=amit)(PORT=1521)))
STATUS of the LISTENER
-----------------------Alias

LISTENER

Version
TNSLSNR for IBM/AIX RISC System/6000:
Version 11.2.0.1.0 - Production
Start Date

01-DEC-2013 16: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...

(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 status details when using static registration


also :-

bash-3.2$ lsnrctl status

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.1.0 Production on 02-DEC-2013 11:50:28

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
(HOST= amit)(PORT=1521)))
STATUS of the LISTENER

-----------------------Alias

LISTENER

Version
TNSLSNR for IBM/AIX RISC System/6000:
Version 11.2.0.1.0 - Production
Start Date

01-DEC-2013 18: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

Above status as "UNKNOWN" resembles that listener has not


checked instance status details that whether it's up or not, it has
just registered the details of instance. So listener is not sure that
whether instance can handle client request or not.
Question - What if i configure static and dynamic in the same
server? Any problem keeping both ?

Answer - No problem , you can keep both.

Вам также может понравиться