No question at this time
The DBA-Village forum
as RSS feed
Site StatisticsEver registered users | 48757 | Total active users | 1320 | Act. users last 24h | 0 | Act. users last hour | 0 | Registered user hits last week | 24 | Registered user hits last month | 1443 |
|
Go up
Listener entries
Subject: |
Listener entries |
Author: |
Jill S, Hong Kong |
Date: |
Jun 29, 2023, 00:36, 88 days ago |
Os info: |
OL 6.7 |
Oracle info: |
12.2 |
Message: |
Dear Exerts,
Can we have default & non default port entries on the same listener.ora file with 2 different listener names ?.
Existing Listener.ora Entry
-------------------------------
[oracle@replica admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = primdb)(PORT = 1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = crms)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
)
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
)
)
ADR_BASE_LISTENER = /u01/app/oracle
Questions
------------------ 1) If i want to add one more entry with different port 1530 & listener name is LISTENER_HRMS
Is it good approach to add all entries in Single file ? Or Should i go for separate configuration file for LISTENER_HRMS with 1530 ?
Regards,
Jill |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: Listener entries |
Author: |
Bruno Vroman, Belgium |
Date: |
Jul 03, 2023, 13:27, 84 days ago |
Score: |
       |
Message: |
Hello Jill,
there is a single "listener.ora" file (in $ORACLE_HOME/network/admin) but it can indeed contain several distinct listeners, assuming that each is using its own port.
This provides you a way to limit the connections to a given database (by stopping its listener) without impacting the others.
It can also be used as a security measure, for example by limiting via firewalls the flows between application servers and database server (example: same DB server hosts database AAA with a listener on 1540 and database BBB with a listener on 1545, application server ASA hosting application needing access to AAA can connect to DB server on port 1540 (but not 1545), application server ASB hosting application needing access to BBB can connect to DB server on port 1545 (but not 1540).
This way even if someone knows the connection details of an account of database BBB (host port service_name or sid username password), connection from ASA will not be possible.
Here is for example a listener.ora that I use (I just modified names)
LISTENER_DB1 = (ADDRESS = (PROTOCOL = TCP)(HOST = myserver)(PORT = 1566))
SID_LIST_LISTENER_DB1 = (SID_DESC = (GLOBAL_DBNAME = DB1 )(SID_NAME = DB1) (ORACLE_HOME = /u01/app/oracle/product/19.0.0.0/dbhome_q223) )
LISTENER_DB2 = (ADDRESS = (PROTOCOL = TCP)(HOST = myserver)(PORT = 1604))
SID_LIST_LISTENER_DB2 = (SID_DESC = (GLOBAL_DBNAME = DB2 )(SID_NAME = DB2) (ORACLE_HOME = /u01/app/oracle/product/19.0.0.0/dbhome_q223) )
LISTENER_DB3 = (ADDRESS = (PROTOCOL = TCP)(HOST = myserver)(PORT = 1558))
SID_LIST_LISTENER_DB3 = (SID_DESC = (GLOBAL_DBNAME = DB3 )(SID_NAME = DB3) (ORACLE_HOME = /u01/app/oracle/product/19.0.0.0/dbhome_q223) ) HTH,
Bruno Vroman. |
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: Listener entries |
Author: |
Joël Péran, France |
Date: |
Aug 24, 2023, 15:44, 32 days ago |
Message: |
Hi Bruno,
I saw recently an article about the LOCAL_LISTENER parameter that was really interesting. When you interrogate the listener by entering lsnrctl status <mylistenername>, you always see that the database status is not known by the listener. Thus, when you don't add the SID_LIST on the listener.ora file, and add lines in the tnsnames.ora for each listener and use it on the local_listener variable; once you reload the listener and let the PMON process talk with the listener that was registered to the database (you may have to issue an alter system register to force PMON to register to the listener). It is specially used when not using the 1521 port :)
You have many things on the web dealing with this (https://logic.edchen.org/how-to-set-multiple-listeners-in-database/, for example, or on YouTube too :)).
Have a great day,
Regards,
Joel |
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
|