How to Purge Listener Log Data


Solution 1:

[[email protected] trace]$ cp listener.log listener_backup.log

[[email protected] trace]$ cat /dev/null>listener.log

[[email protected] trace]$ gzip listener_backup.log

Solution 2:

[[email protected] ~]$ lsnrctl

LSNRCTL for Linux: Version – Production on 02-JAN-2012 13:17:22

Copyright (c) 1991, 2011, Oracle. All rights reserved.

Welcome to LSNRCTL, type “help” for information.

LSNRCTL> show current_listener

Current Listener is LISTENER

If you want to change the current listener then execute the following command:

LSNRCTL> set current_listener

LSNRCTL> set log_status off


LISTENER parameter “log_status” set to OFF

The command completed successfully

From another window rename the log file, then return to previous window.

[[email protected] trace]$ mv listener.log listener_backup.log

LSNRCTL> set log_status on


LISTENER parameter “log_status” set to ON

The command completed successfully

This will create a new and empty listener.log file which will continue logging.