I will explain Listener Log file location in Oracle in this post.
Listener Log file location in Oracle
Listener log file locations are very important for us. If you want to learn where listener log file location is, execute the lsnrctl status command as follows.
[oracle@msdbdbadm01 admin]$ lsnrctl status LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 16-JUL-2021 14:54:57 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date 16-JUL-2021 14:54:41 Uptime 0 days 0 hr. 0 min. 15 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12.1.0.2/grid/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/msdbdbadm01/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.16)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.9)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=msdbdbadm01.deveci.local)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1.0.2/dbhome_1/admin/msdb/xdb_wallet))(Presentation=HTTP)(Session=RAW)) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=msdbdbadm01.deveci.local)(PORT=5501))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1.0.2/dbhome_1/admin/REPDB/xdb_wallet))(Presentation=HTTP)(Session=RAW)) Services Summary... Service "FLEXDB" has 1 instance(s). Instance "FLEXDB1", status READY, has 1 handler(s) for this service... Service "FLEXDBXDB" has 1 instance(s). Instance "FLEXDB1", status READY, has 1 handler(s) for this service... Service "REPDB" has 1 instance(s). Instance "REPDB1", status READY, has 1 handler(s) for this service... Service "REPDBXDB" has 1 instance(s). Instance "REPDB1", status READY, has 1 handler(s) for this service... Service "msdb" has 1 instance(s). Instance "msdb1", status READY, has 1 handler(s) for this service... Service "msdbXDB" has 1 instance(s). Instance "msdb1", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@msdbdbadm01 admin]$
I have marked the listener log file and parameter file locations above with RED and BLUE Color.
Listener Parameter File /u01/app/12.1.0.2/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/msdbdbadm01/listener/alert/log.xml
When i go to /u01/app/oracle/diag/tnslsnr/msdbdbadm01/listener/alert directory, you can see the Listener log files ( Archived ) as follows.
-rw-r----- 1 oracle oinstall 11M Jun 11 10:14 log_409.xml -rw-r----- 1 oracle oinstall 11M Jun 11 14:08 log_410.xml -rw-r----- 1 oracle oinstall 11M Jun 12 20:22 log_411.xml -rw-r----- 1 oracle oinstall 5.0M Jul 16 15:07 log.xml [oracle@msdbdbadm01 alert]$ [oracle@msdbdbadm01 alert]$ pwd /u01/app/oracle/diag/tnslsnr/msdbdbadm01/listener/alert [oracle@msdbdbadm01 alert]$
If you want to review the log file, you can display it with tail command as follows.
[oracle@msdbdbadm01 alert]$ tail -10f log.xml host_addr='192.168.3.16'> <txt>16-JUL-2021 15:14:01 * (CONNECT_DATA=(SERVICE_NAME=msdb)(CID=(PROGRAM=C:\Windows\SysWOW64\inetsrv\w3wp.exe)(HOST=WEBMIS)(USER=webmis))(SERVER=dedicated)(INSTANCE_NAME=msdb1)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.60)(PORT=60861)) * establish * msdb * 0 </txt> </msg> <msg time='2021-07-16T15:14:02.106+03:00' org_id='oracle' comp_id='tnslsnr' type='UNKNOWN' level='16' host_id='msdbdbadm01.deveci.local' host_addr='192.168.3.16'> <txt>16-JUL-2021 15:14:02 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=msdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.54)(PORT=50398)) * establish * msdb * 0 </txt> </msg> ^C [oracle@msdbdbadm01 alert]$ [oracle@msdbdbadm01 alert]$ [oracle@msdbdbadm01 alert]$
Listener Parameter File Location
Listener parameter files is located under $ORACLE_HOME/network/admin directory as follows.
If you are using the Oracle RAC, Cluster manages the Listener, and you can also use the static listener.
[oracle@msdbdbadm01 admin]$ cd $ORACLE_HOME/network/admin [oracle@msdbdbadm01 admin]$ [oracle@msdbdbadm01 admin]$ pwd /u01/app/12.1.0.2/grid/network/admin [oracle@msdbdbadm01 admin]$ [oracle@msdbdbadm01 admin]$ cat listener.ora MGMTLSNR=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=MGMTLSNR)))) # line added by Agent # listener.ora Network Configuration File: /u01/app/12.1.0.2/grid/network/admin/listener.ora # Generated by Oracle configuration tools. ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3 = ON ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2 = ON ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON VALID_NODE_CHECKING_REGISTRATION_LISTENER_SCAN3=OFF # line added by Agent VALID_NODE_CHECKING_REGISTRATION_LISTENER_SCAN2=OFF # line added by Agent VALID_NODE_CHECKING_REGISTRATION_LISTENER_SCAN1=OFF # line added by Agent VALID_NODE_CHECKING_REGISTRATION_LISTENER = SUBNET LISTENER = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER)) ) ) ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON LISTENER_SCAN3 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN3)) ) ) LISTENER_SCAN2 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN2)) ) ) LISTENER_SCAN1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1)) ) ) ENABLE_GLOBAL_DYNAMIC_ENDPOINT_MGMTLSNR=ON # line added by Agent VALID_NODE_CHECKING_REGISTRATION_MGMTLSNR=SUBNET # line added by Agent [oracle@msdbdbadm01 admin]$
You can read the following post to learn more details about Oracle Listener.
How to set LOCAL_LISTENER using Alter System Set Command in Oracle
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )