Search notes:

ORA-04092: cannot COMMIT in a trigger

A trigger cannot commit the transaction which fired the trigger (but its possible to execute a trigger in an autonomous transaction.
create table tq84_ora_04092_tab (a number);
 
create or replace trigger tq84_ora_04092_trg
   after insert on tq84_ora_04092_tab
begin
   commit;
end tq84_ora_04092_trg;
/
 
insert into tq84_ora_04092_tab values (42);
-- SQL Error: ORA-04092: cannot COMMIT in a trigger
-- ORA-06512: at "RENE.TQ84_ORA_04092_TRG", line 2
-- ORA-04088: error during execution of trigger 'RENE.TQ84_ORA_04092_TRG'
  
drop table tq84_ora_04092_tab;   

See also

Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758198826, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-04092_cannot-COMMIT-in-a-trigger(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78