Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Keeping my triggers enabled
jantah wrote:
>
> Hi all,
>
> Because we wanted to be absolutely sure nobody would accidently disable a
> trigger on our database, I wrote a little shell script to keep an eye on
> them. It's basically a loop that checks the dba_triggers view using
> SQL*Plus every three seconds. If it finds any disabled triggers, the
> script will perform an immediate shutdown of the database. I agree that
> this is a bit drastic (I aptly named the script after my sisters pitbull
> terrier ;-), but we considered this the most secure option.
>
> Question is, if this the best way to do this? Starting SQL*Plus every
> three seconds for a check this simple looks a bit steep to me. Is there
> another way to perform this check from a shell script? Is there a way to
> make an SQL script sleep for three seconds?
>
> --
> Jan
>
> jantah_at_hot.mail.com
> ... and you know what to do with hot.mail, right ?
Some thoughts for you...
Why not regularly monitor the ability to issue ALTER TRIGGER instead ?
If you really do you want to monitor triggers - you'd be better off looking at the source tables (not the view) which would be more efficient...
You can sleep DBMS_LOCK.SLEEP or host commands to sleep in SQL PLus, but I would still recommend preventing the problem rather than reacting to it.
HTH
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Mon Nov 06 2000 - 14:00:15 CST