Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: lsnrctl set_logging command
You would want to use the set log_file command to rename your listener
log file without restarting the listener. Below is a snippet from a db
cleanup script I use. Won't help much with your OS but shows process.
The listener logging process stays attached even after you rename you
log file.
Alan
mv_listener () {
#####################################################
# Move current DB listener log to log_old directory
# and set new log file name to listener_{today's date}.log
#####################################################
for fname in `ls $DBLOG_DIR | grep log | grep -v log_old` do
chk_file=`find $DBLOG_DIR -name $fname -print`
if [ -n "$chk_file" ] ; then
mkdir -p ${DBLOG_DIR}/log_old
mv $DBLOG_DIR/${fname} $DBLOG_DIR/log_old/${fname}
echo " Moving [ ${fname} ] to [ log_old/${fname} ] "
else
echo " No ${fname} to move. "
fi;
done
#
${ORACLE_HOME}/bin/lsnrctl << !
set log_file listener_${dt}.log
!
#
echo ""
#
}
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Oct 04 2006 - 16:58:41 CDT