Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SYS can't own triggers?!

Re: SYS can't own triggers?!

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 15 Aug 2002 14:56:19 GMT
Message-ID: <3D5BC10D.A2A3A811@exesolutions.com>


Anurag Varma wrote:

> They'll probably be others who will ask you:
> Why are you trying to create triggers on SYS objects?
> Its probably a catch-22 but a person who does not know that
> he cannot create triggers on SYS objects is the last person who
> should be creating triggers on SYS objects (i.e. if it were possible)
>
> :)) Sorry. Could not help myself.
>
> I don't know the complete answer but I can imagine a scenario when
> a before insert trigger is created on obj# table which changes the name
> of the object before inserting. DB will quickly die down. Why somebody would do this ..
> well ..
>
> There can be so many other scenarios .. you just use your imagination.
>
> Anurag
>
> "Peter Chatterton" <peter_at_chatterton.name> wrote in message
> news:WlD69.6257$2T2.1099477_at_news20.bellglobal.com...
> > I ran the wrong script by mistake and got an ORA-04089.
> > The manual very helpfully says:
> >
> > ORA-04089 cannot create triggers on objects owned by SYS
> > Cause: An attempt was made to create a trigger on an object owned by
> > SYS.
> > Action: Do not create triggers on objects owned by SYS.
> >
> > Can someone explain the sense, if any, behind this; hopefully in simple
> > terms?
> >
> > Thanks,
> > Peter.
> >
> >
> >
> >

Glad you couldn't help yourself from stating the obvious.

The reason is that there is nothing you can do with a trigger on a SYS object that won't threaten the integrity, performance and scalability of the database, nor is there any reason to create one. Whatever you can accomplish with a trigger on a SYS object can be accomplished by other means.

The one exception to the rule is SYSTEM triggers such as AFTER LOGON that must be owned by SYS. Daniel Morgan Received on Thu Aug 15 2002 - 09:56:19 CDT

Original text of this message

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