Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: lsnrctl set_logging command

RE: lsnrctl set_logging command

From: Alan J. Gagne <alan.gagne_at_comcast.net>
Date: Wed, 04 Oct 2006 17:58:41 -0400
Message-Id: <1159999121.24500.7.camel@linux0.dbonenet.com>


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-l
Received on Wed Oct 04 2006 - 16:58:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US