The pragma is not valid at the package level.
SQL> SQL> CREATE OR REPLACE PACKAGE Auto3 AS 2 PRAGMA AUTONOMOUS_TRANSACTION; 3 PROCEDURE P; 4 PROCEDURE Q; 5 END Auto3; 6 / Warning: Package created with compilation errors. SQL> show errors Errors for PACKAGE AUTO3: LINE/COL ERROR -------- ----------------------------------------------------------------- 2/10 PLS-00710: PRAGMA AUTONOMOUS_TRANSACTION cannot be specified here SQL>