Hi Ron,
Right, that's exactly the same as my method.
And the scenario you wrote about makes me even more willing to avoid
"rm" and "mv" with the alert.log!
Cheers
Jerome
On 6/10/05, Ron Rogers <RROGERS_at_galottery.org> wrote:
> Redhat Linux.
>=20
> I have always found it safer to
> cp the log if you want to save it
> and then zero out the old log with
> cat /dev/null > alert.log
>=20
> Under the old HP unix we had a problem where the alert.log was deleted by=
the SU and the file
> disapeared but the alert.log was still being written to in the 10% reserv=
ed disk space. We had to
> shut town the oracle to reestablish the connection the the disk file syst=
em.
>=20
> Ron
>=20
> >>> Vitalis Jerome <vitalisman_at_gmail.com> 06/10/05 9:15 AM >>>
> On 6/10/05, Ignizio, Richard <richard.ignizio_at_paetec.com> wrote:
> > I agree with Tom, we are on a Sun UNIX box and we move the alert.log (2=
5+=3D
> databases) every week without any issues and have been doing it for the =
la=3D
> st 5 years.
> >=3D20
> > Rich
>=20
> 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:
>=20
> 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.
>=20
> 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)
> ...
>=20
> Definitely the most simple and neat solution is "cp" and then ">alertSID.=
lo=3D
> g".
>=20
> Jerome
> --
> http://www.freelists.org/webpage/oracle-l
>=20
>
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 10 2005 - 10:07:20 CDT