Aggregator | Books | Industry News | Firefox Plugins | Social | Links

Comments

Database Triggers Overview - An introduction to database triggers in Oracle.



poelger said...

Maybe you should warn in your article about using non-transactional operations(package variables, autonomous transactions, ...) in triggers.
Oracle can restart DML statements.
I described this at our blog:
https://iadviseblog.wordpress.com/2010/12/17/statement-restart/

And it is discussed on the Pl/SQL Challenge blog:
http://plsql-challenge.blogspot.com/2011/02/dml-restarts-only-happen-with.html

Tim... said...

Hi.

Good point. I've added it into the the "Should you use triggers at all?" section.

Cheers

Tim...

lesio said...

Very good article. DML restarts are kind of shock :p

Jeroen said...

Hi,

About the behaviour in merge statements:

ELSE
-- Include any code specific for when the trigger is fired from a MERGE.
-- A merge is not recognized as either of the three conditions, so it is implied.

It seems this was more or less a bug prior to 11g2. From this version on a generic statement trigger fires twice, oce with UPDATING=TRUE and once with INSERTING=TRUE

Tim... said...

Hi.

Thanks for the heads-up. I've corrected the article and included the way the fact the delete is not triggered for a delete clause of a merge. :)

Cheers

Tim...

DO NOT ask technical questions here, that's what my forum is for!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

Add your comments here.
Name
Comment
(max 400 chars - plain text)