Search notes:

Oracle PL/SQL: PRAGMA AUTONOMOUS_TRANSACTION

A PL/SQL block that is declared with pragma autonomous_transaction executes in its own transaction.
The pragma can appear anywhere in a procedure's or function's declarative section (between the is or declare and begin):
create or replace procedure proc_or_func_name
is
   PRAGMA AUTONOMOUS_TRANSACTION;
begin
   null;
end;
/
Nested blocks cannot have this pragma.
If a block that is declared with autonomous_transaction starts a transaction and is left without explicitly commiting or rolling back the transaction, Oracle throws the error ORA-06519: active autonomous transaction detected and rolled back.

See also

Uncommitted transaction with PRAGMA AUTONOMOUS_TRANSACTION
The (deprecated) pragma restrict_references allows to make sure that a function or procedure does not read or write from/to tables or modify package variables.
Triggers must be autonomous to execute DDL or TCL statements.
Logger function using pragma autonomous_transaction

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...', 1759481858, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/PL-SQL/pragma/autonomous_transaction/index(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78