Hello,
 
Thank you very much for your responses. What i wanted to do was compressing the listener.log. It works fine as below :
cp listener.log listener.log.$(date +%y%d%m)
cat /dev/null > listener.log
compress listener.log.$(date +%y%d%m)
 
Regards,
 
Nguyen Thanh-truc
----- Original Message -----
Sent: Wednesday, April 25, 2001 1:45 AM
Subject: RE: Listener.log

For those of you who did not see my response in the thread of "Perl DBA Tools" I will repeat it here, it answers this thread as well.  Also, there is no need to shutdown the database to bounce the listener.
 
How about wrapping this in a script of your choice:
 
ARCHIVE_LISTENER_FILENAME=listener`date +%Y%m%d%H%M`.log
lsnrctl set log_file listener2.log
mv listener.log $ARCHIVE_LISTENER_FILENAME
mv listener2.log listener.log
lsnrctl set log_file listener.log
gzip $ARCHIVE_LISTENER_FILENAME
 
This way, you don't have to stop the listener and you don't loose anything.  Remember, in Unix, when you rename a file, any program that has it open still points to it.
 
Regards,
John

Reply via email to