listener.ora and tnsnames.ora location in oracle 12c database

In our previous blog We have seen about the error message related to the address of tnsnames.ora file.

In this blog we will see the location of listener.ora and tnsnames.ora file . listener.ora is the database server level file and tnsnames.ora is the client side file.

oracle listener service should be up and running to get the new connection to oracle database.

In this blog, I will show you how to check the location of listener.ora and tnsnames.ora file in database server.

if your listener is up and running then you can get the both file path from there.

  • Check the listener status.

[oracle@oracle ~]$ lsnrctl status
LSNRCTL for Linux: Version – Production on 19-JUN-2019 10:17:56
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
Version TNSLSNR for Linux: Version – Production
Start Date 19-JUN-2019 10:00:30
Uptime 0 days 0 hr. 17 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
Listener Parameter File /data/oracle/app/oracle/product/
Listener Log File /data/oracle/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
Listening Endpoints Summary…
Services Summary…
Service “cdb1” has 1 instance(s).
Instance “cdb1”, status READY, has 1 handler(s) for this service…
The command completed successfully

if you observe the above listener status , there you will find the location of listener.ora file and in the same location you can see the tnsnames.ora file.

I have listed down the files available in that location.

[oracle@oracle ~]$ ls -lrt /data/oracle/app/oracle/product/
total 40
-rw-r–r– 1 oracle oinstall 373 Oct 31 2013 shrept.lst
drwxr-xr-x 2 oracle oinstall 4096 Jun 2 11:38 samples
-rw-r–r– 1 oracle oinstall 201 Jun 2 17:33 sqlnet.ora
-rw-r–r– 1 oracle oinstall 343 Jun 2 17:33 listener.ora
-rw-r—– 1 oracle oinstall 511 Jun 5 10:13 tnsnames.ora

  • 2. Generic path for listener.ora and tnsnames.ora file

Both the files located under below path

if you want to know about the listener.ora and tnsnames.ora file then you can read from oracle official site.

Thanks for visiting this post. Please contact us if you are looking for training.
Subscribe to our channel for unlimited learning. Thank you!!!

Share and Enjoy !

0 0 0

Recommended For You


About the Author: ankushthavali

Leave a Reply

Your email address will not be published. Required fields are marked *