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

Thread: After Trigger to save data on based on uncommitted update

  1. #1
    Join Date
    Jul 2003
    Posts
    136

    Question After Trigger to save data on based on uncommitted update

    Env: Oracle ADF, Oracle 11g

    Situation: Have ADF transaction processing 2 tables (a, b) data logic and committing them in same transaction.

    ADF Application Transaction T1 starts
    Table A, record A1 updated
    Table B, new record B1 inserted --> After insert Autonomous database Trigger T1 fires
    Trigger T1 logic: Based on A1 updated value, insert new Record B2 record in Table B and explicitly commit in trigger logic.
    Transaction completes (commit)



    Issue - B2 insert depends upon A1 commit, A1 gets committed only after Transaction T1 completes

    Question: How can I make Table A A1 commited data avaiable to Trigger on Table B

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool

    Quote Originally Posted by daljitsb View Post
    Env: Oracle ADF, Oracle 11g

    Situation: Have . . . whatever ...
    . . . . and explicitly commit in trigger logic.
    Transaction completes (commit)

    Issue - B2 insert depends upon A1 commit, A1 gets committed only after Transaction T1 completes

    Question: How can I make Table A A1 commited data avaiable to Trigger on Table B
    What business requirement forces you to have: "B2 insert depends upon A1 commit,"?

    When you do commit in the middle of transaction with the "AUTONOMOUS_TRANSACTION pragma" it create a new SCN for that transaction and when the original transaction commits" you may end up with an SCN mismatch corruption error thrown. So you use it at your own peril.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

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