Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can we use pragma autonoumous_transactions inside the procedure

User_35O2QNov 17 2022 — edited Nov 17 2022

I tried to use pragma autonomous_transctions inside the procedure , for that i created the
dummy table and dummy procedure and tried to use the pragma autonomous_transctions but
it actually showing me error..
create or replace procedure jai_sp
2 as
3 pragma autonomous_transctions;
4 begin
5 insert into jai values(6);
6 commit;
7 end;
8 /

Warning: Procedure created with compilation errors.

SQL> show error
Errors for PROCEDURE JAI_SP:

LINE/COL ERROR
-------- -----------------------------------------------------------------
3/8 PLS-00127: Pragma AUTONOMOUS_TRANSCTIONS is not a supported
pragma
what is the problem , can we really use the pragma autonomous_transactions inside the procedure with any conditions provided. kindly tell me the solutions for this problem.

Comments
Post Details
Added on Nov 17 2022
2 comments
570 views