Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_SNAPSHOT error...
Frank van Bortel wrote:
> You cannot commit in a trigger.
Unless that trigger is an autonomous transaction.
The following is valid and useful.
CREATE OR REPLACE TRIGGER pat_demo
BEFORE INSERT
ON person
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO audit_log
(chng_when, commentcol)
VALUES
(SYSDATE, 'Reporting an error');
COMMIT;
END pat_demo;
/
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Fri Jan 27 2006 - 16:24:31 CST
![]() |
![]() |