DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Error - COMMIT in Trigger

  1. #1
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    Why can't I commit in a before or after insert trigger? Any work around? I cannot avoid the commit becuase I'm calling an Oracle supplied package that has a commit in it!!

    /oracle> oerr ora 4092
    04092, 00000, "cannot %s in a trigger"
    // *Cause: A trigger attempted to commit or Rollback.
    // *Action: Rewrite the trigger so it does not commit or rollback.
    Don't blame me, I'm from Red Sox Nation.

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    You must use an autonomous transaction:

    http://otn.oracle.com/docs/products/...trans.htm#1670
    Jeff Hunter

Posting Permissions

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


Click Here to Expand Forum to Full Width