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: triggers

Re: triggers

From: Steve Howard <stevedhoward_at_gmail.com>
Date: 16 Nov 2006 10:26:35 -0800
Message-ID: <1163701595.051950.114360@f16g2000cwb.googlegroups.com>

EdStevens wrote:
> Steve Howard wrote:
> > schw wrote:
> > > hi all,
> > >
> > > can one trigger be fired twice simultaneously ? I've got one trigger
> > > that writes to a file and I'm worried that if the triggers is fired
> > > twice simultaneously I end up with garbage in the file.
> > >
> > > what do you think?
> > >
> > > regards,
> > > schw
> >
> > In a given session for a given operation it only fires once. If the
> > table on which the trigger is based is heavily
> > updated/deleted/inserted, or whatever event for which the trigger
> > fires, it sounds from your description like you could have multiple
> > sessions writing to your file at the same time. You can use DBMS_LOCK
> > if you are writing to an external file and need to serialize access to
> > it.
> >
> > HTH,
> >
> > Steve
>
> Wouldn't this create a huge bottleneck?

Oh, yeah :) I never read too much in more than what someone asks, though, as I don't know the background (nor have the time to). I remember writing an equivalent of the export tool several years ago, and being castigated by several prominent posters for doing it when I asked some questions and mentioned what I was doing. To this day, it was the single greatest learning exercise I ever undertook, which is all it was. I learned more about the dictionary, PL/SQL, and database structures in that month than doing anything else.

It had about 2% of the functionality of Oracle's tool, but when do you know more about a Ferarri; when you rebuild from the ground up a '68 Chevelle or when you read a lot of books about the Ferrari and drive it? If you rebuild the '68 Chevelle, you will eventually understand everything about the Ferrari (and understand, most importantly, the differences between the two).

You're right about the bottleneck though, no doubt about it :)

Regards,

Steve Received on Thu Nov 16 2006 - 12:26:35 CST

Original text of this message

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