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