Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Can i set listener.log file location ?

GTS (DBA)May 26 2015 — edited May 27 2015

Hi all;

Command LSNRCTL is NOT showing correctly listener.log location.

listener.log is located at different path which was showing from LSNRCTL.


$ ls -l /u02/app/oracle/diag/tnslsnr/SERVER1/listener/trace/

total 624

-rwxrwxr-x  1 oracle oinstall 633414 May 27 07:16 listener.log

LSNRCTL> status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SERVER1.ORACLE.COM)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date                26-MAY-2015 22:23:37

Uptime                    0 days 8 hr. 53 min. 18 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u02/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File         /u02/app/oracle/diag/tnslsnr/SERVER1/listener/alert/log.xml

..

...


How can i set listener.log file location ?

Comments

unknown-951199

>How can i set listener.log file location ?

You can't.

why are you wasting your time & our time is irrelevant housekeeping details?

Hemant K Chitale

The 11g listener has two log files -- one as an XML file in the XML directory and one as a plain-text file (as was in earlier versions) in the trace directory (it was the log directory in earlier versions)

Hemant K Chitale

GTS (DBA)

Hi;

This is NOT irrelevant task. Listener.log is growing too large ..



EdStevens

The growth will be the same even if you could specify a different location. Your housekeeping efforts need to be pointed in a different direction.

unknown-951199

GTS (DBA) wrote:

Hi;

This is NOT irrelevant task. Listener.log is growing too large ..



cd /u02/app/oracle/diag/tnslsnr/SERVER1/listener/trace/

tail -1000 listener.log > listener.log.20150526

cp  /dev/null  listener.log



unknown-7404

How can i set listener.log file location ?

Have you tried just setting the LOG_DIRECTORY_listener_name parameter?. When you have basic doc questions search the Oracle docs first.

http://docs.oracle.com/cd/B28359_01/network.111/b28317/listener.htm#BGBJEHGC

LOG_DIRECTORY_listener_name

Purpose

Use the LOG_DIRECTORY_listener_name parameter to specify the destination directory of the listener log file. Use this parameter when ADR is not enabled.

Default

The $ORACLE_HOME/network/log directory on UNIX operating systems and the %ORACLE_HOME%\network\log directory on Windows operating systems.

Example

LOG_DIRECTORY_listener=/oracle/network/admin/log  
BPeaslandDBA

Keep in mind that if you use LOG_DIRECTORY to move the listener log to a different location, then should you ever need to send a Listener log to Oracle Support for analysis, you will have to handle things on your own. You won't be able to use ADR to bundle up the files automatically.

Myself, I would rather use adrci to regularly keep the files in check and write /dev/null to the one in the trace subdir.

Cheers,
Brian

unknown-698157

So..............you READ some documentation and notice Oracle provides the ADRCI tool for housekeeping.

These people who never read documentation and start to whine... so booooring.

-------------

Sybrand Bakker

Senior Oracle DBA

1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 24 2015
Added on May 26 2015
8 comments
1,325 views