Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger for databse
Bill Meyer wrote:
> hello,
>
> i have a database called zzzyyy....i have two users within that
> database...one called aaa and the other called bbb...aaa and bbb have
> the same tables,indexes,objects,etc..I would like to write a trigger
> that anytime a change is made to bbb the same change would be made to
> aaa....
>
> any help would be appreciated.....
>
> thanks again,
> bill
Oh how I want to advise you to pay better attention in class. I'll bite my tongue.
What you are trying to do will not work unless very carefully coded. You will create a recursion problem when a change to aaa causes a change to bbb which causes a change to aaa which causes a change to bbb until you bring the entire thing down in 50 or so iterations.
If this is not a classroom exercise then the simple solution is that your design is terrible and needs to be redone. There should be only a single table in schema ccc and privileges to that table should be granted to aaa and bbb. If this is a classroom exercise then my tongue biting is over.
Daniel Morgan Received on Mon Feb 24 2003 - 16:05:41 CST