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: Need script to copy and then truncate/tail alert log

RE: Need script to copy and then truncate/tail alert log

From: Veronica Levin <vlevin_at_victoria.com.ni>
Date: Wed, 2 Aug 2000 09:41:50 -0600
Message-Id: <10577.113607@fatcity.com>


thanks to all who answered my post!

-----Mensaje original-----
De: ddorr.cs_at_clearstream.com [mailto:ddorr.cs_at_clearstream.com] Enviado el: Viernes 28 de Julio de 2000 5:44 AM Para: Multiple recipients of list ORACLE-L Asunto: RE: Need script to copy and then truncate/tail alert log

Perform a mv.
If oracle is currently writing to the file - thus having a file = descriptor
open on it - it will still write to it.
The next write will recreate a new alertSID.log, as oracle doesn't keep = this
file open between write operations.

> ----------
> From: Elliott, Patrick[SMTP:Patrick.Elliott_at_bestbuy.com]
> Reply To: ORACLE-L_at_fatcity.com
> Sent: Thursday, July 27, 2000 23:48
> To: Multiple recipients of list ORACLE-L
> Subject: RE: Need script to copy and then truncate/tail alert log
>=20
> Don't "rm" it! If Oracle is writing to the file, it may complain =
since
> the
> i-node changes when a new file is created. The better alternative is =
to
> do

>=20

> cp alert_instance.log alert_instance.log.save
> cat /dev/null > alert_instance.log

>=20
> This will empty the file, but not change it's i-node number. This =
command
> will also work if oracle is writing to the file. The only caveat =
here is
> that you will miss any messages that occur between the two commands.
>=20

> > -----Original Message-----
> > From: Veronica Levin [SMTP:vlevin_at_victoria.com.ni]
> > Sent: Thursday, July 27, 2000 10:55 AM
> > To: Multiple recipients of list ORACLE-L
> > Subject: RE: Need script to copy and then truncate/tail alert log
> >=20
> > Hi Ruth,
> >=20
> > Can I do this while database is up and running???
> >=20
> > Is this valid for the tcp_listener.log?
> >=20
> > Both are huge already and I have been trying to reduce it size with =
 no
> > success.
> >=20
> > Thanks in advance!
> >=20
> > Saludos,
> >=20
> > Ver=F3nica Levin Enr=EDquez
> > Administrador AIX
> > Compa=F1=EDa Cervecera de Nicaragua
> > Tel=E9fono: 505-2493779
> > Fax: 505-2443979
> > Email: vlevin_at_victoria.com.ni=20
> > http://www.victoria.com.ni
> >=20
> >=20
> >=20
> >=20
> >=20
> > -----Mensaje original-----
> > De: Ruth Gramolini [mailto:rgramolini_at_tax.state.vt.us]
> > Enviado el: Mi=E9rcoles 26 de Julio de 2000 10:36 AM
> > Para: Multiple recipients of list ORACLE-L
> > Asunto: Re: Need script to copy and then truncate/tail alert log
> >=20
> >=20
> > You can use the OS cp and rm commands if it's UNIX. cp the alert =
log to
> a
> > new place or name and the rm it. You can use the copy, and rename
> > functions on NT too. Tail simply gives you the last rows of the =
table.
> > You
> > don't need to truncate it because it will recreate itself as =
necessary.
> >=20
> > HTH,
> > Ruth
> > ----- Original Message -----
> > To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> > Sent: Wednesday, July 26, 2000 11:40 AM
> >=20
> >=20
> > > Does anyone have a script that will copy over and then truncate =
or
> tail
> > (I
> > can't
> > > remember if it's tail)
> > > the alert log? Or something appropriate to keep our alert log to =
a
> > day's
> > worth
> > > of log information while
> > > keeping the file in the same directory (hopefully with a =
datestamp in
> > the
> > old
> > > log file name). Then we
> > > want to clean out the old log files on a weekly or daily basis.
> > >
> > > Thanks in advance for any help.
> > >
> > > Cherie
> > >
> > >
> > > --
> > > Author:
> > > INET: Cherie_Machler_at_gelco.com
> > >
> > > 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: ListGuru_at_fatcity.com (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).
> > >
> >=20
> > --=20
> > Author: Ruth Gramolini
> > INET: rgramolini_at_tax.state.vt.us
> >=20
> > 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: ListGuru_at_fatcity.com (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).
> > --=20
> > Author: Veronica Levin
> > INET: vlevin_at_victoria.com.ni
> >=20
> > 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: ListGuru_at_fatcity.com (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).
> --=20
> Author: Elliott, Patrick
> INET: Patrick.Elliott_at_bestbuy.com
>=20

> 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: ListGuru_at_fatcity.com (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).
>=20
--=20
Author:=20
  INET: ddorr.cs_at_clearstream.com
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: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L Received on Wed Aug 02 2000 - 10:41:50 CDT

Original text of this message

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