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: calling plsql with invoker rights from trigger

Re: calling plsql with invoker rights from trigger

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 22 Feb 2004 06:55:17 -0800
Message-ID: <1077461676.399856@yasure>


Billy Verreynne wrote:

> Mark Bole <makbo_at_pacbell.net> wrote in
>
>

>>Are you saying that this would be much better as a DBMS_ALERT, rather 
>>than a trigger?  The LDAP update should be concurrent with the table 
>>update, although if it fails it isn't fatal.

>
>
> Mark, I'm saying "WHAT IS A TRANSACTION?".
>
> Think about the ACID properties and then tell me whether or not to
> make a transaction reliant on the successful completion of sendmail
> code, passes the ACID test?
>
> I'm saying "WHAT ABOUT PERFORMANCE?". What are the overheads of that
> code in the trigger that has *NOTHING* to do with maintaining data
> integrity? When will developers start to think about writing scalable
> code!?
>
> Updating an LDAP server via a trigger - that to me is walking a very
> thin line. If the LDAP update fails, what then? Do you rollback the
> insert? Do you commit, causing now an inconsistency between the db and
> LDAP servers? Or do you rather use another mechanism that can provide
> the consistency and management of keeping your EMP table and LDAP
> server in sync?
>
> I would say the latter. In which case a trigger is most certainly not
> the right tool for updating the LDAP server.
>
> --
> Billy

Consider putting the code dealing with issues that don't relate specifically to the transaction into a stored procedure set up with PRAGMA AUTONOMOUS_TRANSACTION. That way if it fails no harm is done.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Sun Feb 22 2004 - 08:55:17 CST

Original text of this message

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