The pragma is not legal in nested blocks:
SQL> BEGIN 2 DECLARE 3 PRAGMA AUTONOMOUS_TRANSACTION; 4 BEGIN 5 COMMIT; 6 END; 7 END; 8 / PRAGMA AUTONOMOUS_TRANSACTION; * ERROR at line 3: ORA-06550: line 3, column 12: PLS-00710: PRAGMA AUTONOMOUS_TRANSACTION cannot be specified here SQL> SQL> SQL>