Re: Renaming / deleting listener.log and alert log

  • From: Vitalis Jerome <vitalisman@xxxxxxxxx>
  • To: "Ignizio, Richard" <richard.ignizio@xxxxxxxxxx>
  • Date: Fri, 10 Jun 2005 15:15:08 +0200

On 6/10/05, Ignizio, Richard <richard.ignizio@xxxxxxxxxx> wrote:
> I agree with Tom, we are on a Sun UNIX box and we move the alert.log (25+=
 databases) every week without any issues and have been doing it for the la=
st 5 years.
>=20
> Rich

I agree it can be done without risks provided the Unix oracle user is
allowed to have enough inodes opened simultaneously (and in real
environment it's always the case, yes). But it is not clean:

Since the instance is not shut down after the "mv", its processes
still hold the old file open. When they need to write an alert, it is
written to the new alertSID.log but they hold both files open.

As for a "rm" instead of "cp"+"mv", it also leaves the inode open by
the instance:
$ lsof|grep 368024
oracle  10561 oracle    6w   REG      254,8      7300    368024
/usr/oracle/admin/TEST/bdump/alert_TEST.log (deleted)
oracle  10561 oracle    7w   REG      254,8      7300    368024
/usr/oracle/admin/TEST/bdump/alert_TEST.log (deleted)
oracle  10563 oracle    6w   REG      254,8      7300    368024
/usr/oracle/admin/TEST/bdump/alert_TEST.log (deleted)
oracle  10563 oracle    7w   REG      254,8      7300    368024
/usr/oracle/admin/TEST/bdump/alert_TEST.log (deleted)
...

Definitely the most simple and neat solution is "cp" and then ">alertSID.lo=
g".

Jerome
--
//www.freelists.org/webpage/oracle-l

Other related posts: