Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Location
    Woking
    Posts
    107

    Unanswered: Autonomous Transactions

    Hi,
    Does Oracle support Autonomous Transactions.
    i want to issue a commit inside a database trigger.
    how can i use Autonomous Transactions to achive this.

    Please Help...
    nn

  2. #2
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    118

    pragma autonomous_transaction;

    Yes you can, first declaration in your declare section hast to be "pragma autonomous_transaction".

    Good Luck!


    Remi

    http://askremi.ora-0000.com
    Remi Visser

    Oracle Database Administrator
    (OCP certified 8i)

    Homepage: http://home.remidian.com/

  3. #3
    Join Date
    Jan 2003
    Location
    Woking
    Posts
    107

    Re: pragma autonomous_transaction;

    Originally posted by remivisser
    Yes you can, first declaration in your declare section hast to be "pragma autonomous_transaction".

    Good Luck!


    Remi

    http://askremi.ora-0000.com
    Hi,
    Cool.. Thanks it worked.
    nn

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: pragma autonomous_transaction;

    Originally posted by NoviceNo1
    Hi,
    Cool.. Thanks it worked.
    You must be aware that by making this trigger autonomous, its work falls outside the scope of the main transaction - i.e. if the user issues a ROLLBACK of the triggering statement, the work done by the trigger will remain. Of course, that may be exactly what you want if you are doing something like logging user activity, but for some situations it would be the wrong thing to do, and could corrupt your database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •