Skip to Main Content
  • Questions
  • How to find list of listeners that are configured on oracle 12c

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Ravi B.

Asked: October 23, 2017 - 5:26 pm UTC

Last updated: October 27, 2017 - 4:54 am UTC

Version: 12c

Viewed 10K+ times! This question is

You Asked

Hello AskTom team,

Could you please let me know how to find number of configured listeners for a given Oracle instance?
Is there any data dictionary view where we could find configured but not started and configured but started listeners?

lnsnrctl status would not give if there are more than one listener running. I did not find any "parttern" in listener.ora to grab number of listeners that are configured.

I am not a DBA so need some pointers on this.

thanks!!

and Connor said...

Listeners are not bound to databases as such, in the sense that I have a running database with no listener at all running on the box. (Obviously connectivity from the outside world is not possible but you get the idea).

Similarly, a database can register with a listener on the *different* machine, ie, Machine "X" can accept connections for a database running on machine "Y", via a "hand off" style of mechanism.

If you want to see the listeners that are running you can use OS tools, eg ps

[oracle@vbgeneric ~]$ ps -ef | grep tns
oracle    1976     1  0 00:51 ?        00:00:00 /u01/app/oracle/product/12.2/db_2/bin/tnslsnr LISTENER122 -inherit
oracle    2101     1  0 00:51 ?        00:00:00 /u01/app/oracle/product/12.2/db_2/bin/tnslsnr LISTENER -inherit



or cluster tools (srvctl) if you are running under a cluster arrangement.

Looking at listener.ora on *all* of the ORACLE_HOME's that are installed on the machine would give you an idea of *potential* listeners on the machine, but as I said, that doesn't mean that they are started (or need to be).

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database