Ramin Hossaini

Oracle: Recycle listener.log

May
16

Oracle stores a log-file (listener.log) under $ORACLE_HOME/network/log that keeps track of all connections made to the database.

Oracle keeps this file as an open file-stream, so even if you rename the file, it still keeps on growing as new connections are made.

This method will let you recycle/truncate/purge listener.log without resorting to taking the listener down which would cause a disruption to users.

The idea is to turn log_status off, create a new file, then turn log_status on again

1
2
3
4
$ lsnrctl set log_status off
$ mv listener.log listener.log.old
$ touch listener.log
$ lsnrctl set log_status on

Leave a Reply

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