Dave,
This came from the list a few weeks ago. I amended it slightly but it still
all works.
John

#!/bin/ksh
# Script to copy out listener.log and compress it.
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/8.1.6
export ORACLE_HOME

PATH=$ORACLE_HOME/bin:/usr/local/bin:/bin:/usr/bin

export PATH

COMPRESSED_FILE=/u01/app/oracle/product/8.1.6/network/log/listener`date
+%Y%m%d%H%M`.log

lsnrctl set log_file /u01/app/oracle/product/8.1.6/network/log/listener2.log
mv /u01/app/oracle/product/8.1.6/network/log/listener.log $COMPRESSED_FILE
mv /u01/app/oracle/product/8.1.6/network/log/listener2.log
/u01/app/oracle/product/8.1.6/network/log/listener.log
lsnrctl set log_file /u01/app/oracle/product/8.1.6/network/log/listener.log
compress $COMPRESSED_FILE
#
# now remove all compressed listener logs older than 10 days
#
find /u01/app/oracle/product/8.1.6/network/log/list*.Z -mtime +10 -print
-exec rm {} \;


A suitable crontab entry for the oracle account would be

00 19 * * * /home/oracle/tidy_listener_log.sh  >
/home/oracle/tidy_listener_log.log 2>&1




-----Original Message-----
Sent: 27 June 01 14:36
To: Multiple recipients of list ORACLE-L


I have a listener.log that is rather large.  I want to archive the current
one and create a new one.  From what I can tell is that I have two
options.........

1)      -Shut down the listener service (8.1.7 on NT 4.0)
        -rename the current log
        -startup the listener service again and this will create a new log
listener.log

or

2)      -at a dos prompt type....
        -MSDOS> lsnrctl set log_file listener1.log
        -This can be done without stopping the listener service


Am I correct about these two methods?  Just want to check before I mess
things up.  I have renamed my <SID>Alert.log before but never my listener.

Thanks,

Dave
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Farnsworth, Dave
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



**********************************************************************
This email and any attachments may be confidential and the subject of 
legal professional privilege.  Any disclosure, use, storage or copying 
of this email without the consent of the sender is strictly prohibited.
Please notify the sender immediately if you are not the intended 
recipient and then delete the email from your inbox and do not 
disclose the contents to another person, use, copy or store the 
information in any medium. 
**********************************************************************
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hallas John
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to