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: Using triggers to populate history tables in Oracle 8, should I?

Re: Using triggers to populate history tables in Oracle 8, should I?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 09 Feb 1999 17:01:50 GMT
Message-ID: <36c56985.14432312@192.86.155.100>


A copy of this was sent to "Dean Jefferson" <jeffedw_at_dhfs.state.wi.us> (if that email address didn't require changing) On Tue, 9 Feb 1999 09:34:26 -0600, you wrote:

>I'm an Oracle (formerly Digital) Rdb DBA new to Oracle 8. In Rdb I routinely
>used triggers to insert history records when records in the primary table
>were updated or deleted. A fellow DBA with some Oracle experience tells me I
>should not use triggers that way in Oracle 7/8 because if the database fails
>and has to be recovered, the "trigger written" records will not be written
>by the recovery process.
>
>Will an experienced Oracle DBA give me the straight dope on this? If true it
>sounds like a severe limitation to me.
>
>Dean Jefferson
>

bzzt -- they are wrong....

a trigger is an extension of the triggering statement and protected by the same ACID properties as anything else in the database. If the insert into a table worked and that insert fired a trigger and the trigger did some work elsewhere, then the work done by the trigger is as permanent as anything else.

either everything works (all work is saved) or none of it is -- either the statement succeeds and gets committed (and all side effects as well) or not.

it works the way you thing it should....  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue Feb 09 1999 - 11:01:50 CST

Original text of this message

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