Thanks all.
Very clear and it works.
rgds,
Li
-----Original Message-----
From: Reardon, Bruce (CALBBAY) [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 11:10 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: Listener.log....writing to renamed file
On NT, if you don't want to lose any listener.log entries and you want to
keep using the same logfile name then you will need to use set log_file
twice.
Also, under NT (at least with 815 and 817) don't specify an extension for
the log file - it automatically gets ".log" appended.
For example (something like the following untested code):
----
lsnrctl set log_file temp1
ren listener.log listener_tmp.log
lsnrctl set log_file listener
copy /b listener_tmp.log + temp1.log listener-date.log
del listener_tmp.log
del temp1.log
----
You could put the date into the archived listener log using the for command
to process output of date/t and time/t.
Note that using set log_file requires the listener password to be entered.
This can be automated under NT by using something like:
----
rem create the temp file
echo set password %lnrpwd% > %lnrstart_file%
echo stop %1 >> %lnrstart_file%
echo exit >> %lnrstart_file%
echo. >> %lnrstart_file%
rem feed it into lsnrctl
lsnrctl < %lnrstart_file%
----
Regards,
Bruce
-----Original Message-----
[mailto:[EMAIL PROTECTED]]
Sent: Friday, 25 May 2001 5:53
To: Multiple recipients of list ORACLE-L
Issue the SET LOG_FILE command using lsnrctl, then move/delete/whatever
the old file.
-----Original Message-----
Sent: Thursday, May 24, 2001 1:58 PM
To: ORACLE-L; Xiangli.Li
May I know how to clear the content of listener.log without restart
listener on NT platform ?
thanks.
Li
-----Original Message-----
From: Brian MacLean [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 1:42 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: Listener.log....writing to renamed file
Reload doesn't close/reopen the file. Here is a couple
solutions
How's about a fast cat/clear solution:
#!/bin/ksh
cat listener.log >>listener.log.hist
ex listener.log <<EOF
1,$d
wq
EOF
Or if you wish to purge 90% of the file:
#!/bin/ksh
wc -l listener.log | read v_lines junk
v_keep=$(($(($v_lines * 10)) / 100))
v_purge=$(($v_lines - $v_keep))
ex listener.log <<EOF
1,$v_purged
wq
EOF
-----Original Message-----
Sent: Thursday, May 24, 2001 7:15 AM
To: Multiple recipients of list ORACLE-L
On Thu, 24 May 2001,Tirumala, Surendra scribbled on the wall in
glitter crayon:
->Hi List,
->As a regular maintainance work,I have moved the listener.log file to
->listener.log.old
->and 'touch'ed the listener.log, expecting the logging into this new
file.
->But I am observing the logging being done to listener.log.old,
instead.
->I could not recall any such previous experience.
->FYI, I cannot do any 'experiments' as far as this system is concerned
as I
->have to deal with
->desupported HP-UX(10.01), Oracle (7.2.2.3).
->I have my logging being done to default
path($ORACLE_HOME/network/log), as
->no parameter settings in listener.ora.
->Has anybody experienced this?
->
->TIA,
->
->Suren
->Oracle DBA
->Sony Electronics Ltd.
->
->
The file handle listener is using is still pointed at the old file. To
fix this you need to stop and start the listener. This will not affect
anybody who is already connected. I'm not sure if a reload will do the
same thing.
--
Bill Thater Certifiable ORACLE DBA
Telergy, Inc. [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You gotta program like you don't need the money,
You gotta compile like you'll never get hurt,
You gotta run like there's nobody watching,
It's gotta come from the heart if you want it to work.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No program done by an undergrad will work after she graduates.
--
Please see the official ORACLE-L FAQ: < http://www.orafaq.com>
--
Author: Thater, William
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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Reardon, Bruce (CALBBAY)
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).