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

Home -> Community -> Usenet -> c.d.o.server -> Re: trigger within procedure within trigger

Re: trigger within procedure within trigger

From: Van Messner <vmessner_at_bestweb.net>
Date: Thu, 22 Mar 2001 22:32:02 GMT
Message-ID: <C3vu6.1341$Te.140468@monger.newsread.com>

Yeah after trying a few things I went with the session global which works well. Thanks.

Van

"John Alexander" <jalexander_at_summitsoftwaredesign.com> wrote in message news:bdlu6.15038$g93.2709486_at_typhoon.tampabay.rr.com...
> I think a session global is preferable to enabling and disabling a
 database
> trigger in the code. Disabling a trigger in the middle of a process is a
> non-standard way of doing things, and can lead to confusion by future
> developers. Besides which, when you enable/disable objects it will cause a
> problem for any other user trying to run the insert at the same time.
>
> Van Messner <vmessner_at_bestweb.net> wrote in message
> news:9Sbu6.1214$Te.123698_at_monger.newsread.com...
> > This sounds worse than it is. I have a trigger A on table A that
 ensures
> > the key for any row is drawn from a sequence.
> > I have a procedure that will enable or disable any trigger if you pass
 it
> > the trigger name and what you want to do. It's tested and it works.
> > And I have a view B that hits ten tables and presents a useful set of
> > information to a user.
> >
> > When I update B I use an instead of trigger to update the underlying
 tables.
> > On table A I want to control the key for a row rather than use the
 sequence
> > which trigger A would provide. Then I can use this key value in tables
 that
> > intersect with A. So in the instead of trigger I call the procedure to
> > disable the trigger A. Then I do my inserts and call the procedure to
> > enable the trigger A. However the trigger is not being disabled and
> > enabled. I get no error message from Oracle - but it just doesn't
 happen.
> >
> > My current workaround is to use a session-limited global temporary table
 to
> > store the sequence value for reuse. But this doesn't seem particularly
> > elegant. Any better ideas?
> >
> > Thanks
> >
> >
> >
>
>
Received on Thu Mar 22 2001 - 16:32:02 CST

Original text of this message

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