Purge logfiles in oracle database

46 views
Skip to first unread message

Srikrishna Murthy Annam

unread,
Mar 9, 2014, 6:22:00 AM3/9/14
to askm...@googlegroups.com
Ref MOS : 751082.1
adrci> show control
adrci> show home
adrci> set home diag/tnslsnr/askmrac02/listener_scan3
adrci> purge -age 43200 -type ALERT ( time in min : 30days = 30*24*60) 
adrci> purge -age 43200 -type TRACE
adrci> purge -age 43200 -type incident
adrci> purge -age 43200 -type hm
adrci> purge -age 43200 -type utscdmp
adrci> purge -age 43200 -type cdump

To purge listener log: Ref  1457196.1
1) Stop the listener on a regular basis then you can simply rename the file at the OS level, then on next listener startup, a new one will be created.
or
2) If you have a 24X7 environment and the listener can not be stopped, then you can use the following steps to rename / move the file without having to restart it: 
LSNRCTL>
LSNRCTL> set current_listener <listenername>
LSNRCTL> set log_status off
In another window rename the log file. Then return to previous window
LSNRCTL> set log_status on
which will create a new and empty listener.log file which will continue logging. 
Reply all
Reply to author
Forward
0 new messages