Purging of Listener log file in Oracle Database
Solution 1 :
First find the location of listener log file.
[oracle@qtest ~]$ lsnrctl status
Go the listener log file location and execute the below commands.
[oracle@qtest]$ cp listener.log listener_backup.log
[oracle@qtest]$ cat /dev/null>listener.log
[oracle@qtest]$ gzip listener_backup.log
Solution 2 :
LSNRCTL>
LSNRCTL> set current_listener <listenername>
LSNRCTL> set log_status off
Go the listener log file location and execute the below commands.
[oracle@qtest]$ cp listener.log listener_backup.log
[oracle@qtest]$ cat /dev/null>listener.log
[oracle@qtest]$ gzip listener_backup.log
Solution 2 :
LSNRCTL>
LSNRCTL> set current_listener <listenername>
LSNRCTL> set log_status off
Login into another window and rename the log file and then return to the previous window
LSNRCTL> set log_status on
The above command will create a new and empty listener.log file which will continue logging.
LSNRCTL> set log_status on
The above command will create a new and empty listener.log file which will continue logging.
No comments:
Post a Comment