What is PRAGMA AUTONOMOUS_TRANSACTION ? How to use that ?

Showing Answers 1 - 6 of 6 Answers

An autonomous transaction is used to create a seprate transaction which when commited will commit data only belongs to that transaction
Example
 PROCEDURE Proc 1
  IS
  .
  INSERT 
  UPDATE
  .
 PROCEDURE proc2
  PRAGMA
   AUTONOMOUS_TRANSACTION
   .
   INSERT 
   ....
   UPDATE
   .
  COMMIT (only DML in proc2 is commited)
END proc2;

COMMIT( remaing DML are commited)
END proc1;

  Was this answer useful?  Yes

senkum123

  • Aug 12th, 2007
 

PRAGMA AUTONOMOUS_TRANSACTION is used to commit the transaction in the PL/SQL block which is inside another PL/SQL block which is on the verge of rolling back.

To make an independent transaction within a PL/SQL block

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions