listener.ora and tnsnames.ora location in oracle 12c database
- June 19, 2019
- Posted by: Ankush Thavali
- Category: Oracle DBA
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 188.8.131.52.0 – 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)))
STATUS of the LISTENER
Version TNSLSNR for Linux: Version 184.108.40.206.0 – 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/220.127.116.11/db_1/network/admin/listener.ora
Listener Log File /data/oracle/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
Listening Endpoints 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/18.104.22.168/db_1/network/admin/
-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.
Contact us for Training/ Job Support
Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.