Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    116

    Unanswered: Clarification on the way how triggers are executed

    Hi Guys,

    I have written some triggers on database,
    Triggers were written based on tables,
    each table has 2 types of trigger, insert and update trigger..

    acutally its related to data manipulation..

    Meaning i have a audit table which records each data which is updated or inserted..

    Its used for some monitoring purpose and statistics generation..

    So this is the situation..

    Lets say the trigger has 17 lines of code, and two users caused the trigger to be executed..

    Just assume in the backgroud this happens

    Trigger is executing for User1 and then before the trigger finish executing, User2 caused the same trigger to be executed,

    So my question is will it process the trigger one by one or it will stop half way and start processing for user2?

    I hope you guys get my point..thanks in advance..

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Trigger which fires will come to its end.

  3. #3
    Join Date
    Feb 2005
    Posts
    116
    Quote Originally Posted by Littlefoot
    Trigger which fires will come to its end.
    Hi Thanks for the reply..didnt really get you..
    Meaning 1 trigger wont cause the other one to stop processing even if its fired at the same time? No Interuption/half way processing?

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    As far as I know, second trigger will not stop or interrupt first one from processing.

  5. #5
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    Triggers will run in parallel and will be independent of each other.

    Oracle is designed to run for thousands of users all executing stuff in parallel, as such they have designed virtually everything to run well even when users are contending for the same resource.

    Alan

Posting Permissions

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