Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Posts
    5

    Unanswered: Oracle trigger error

    Hi guys,

    I have a trigger audit.trigg_in_audit which fires when insert,update or delete is done in a table called audit.option_cont.

    The trigger inserts some values from option_cont into another table framework.new_audit. The primary key is composite where one col is running on a sequence.

    Lately i noticed that when a insert done in option_cont fires the trigger 4 times and the values which get populated in new_audit is by 1 insert and 3 updates.(I have the values 'S','M','E' for insert,update,delete respectively). I see 1 S and 3 Ms in the table new_audit for just one insert in option_cont.

    There is only 1 trigger up against the table audit.option_cont and that too is mine. I checked in the view dba_dependencies and there is no other trigger against this table.

    I cant figure out where the prob is. Help needed.

    Regards,
    Prem

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I cant figure out where the prob is

    You have table & DDL. We don't
    You have data & DML. We don't.
    You have trigger code. We don't.

    You have ALL the information & can't debug the problem.
    Why do you expect others, who have NO details, to solve your mystery?

    Can you debug code WITHOUT seeing the code?
    I can not do so.

    At a minimum, POST the trigger code, please.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2009
    Posts
    5
    Thnx for the quick response with a sting.

    The whole thing works fine in our test environment. So I don't think there is a problem with the code.

    Anyway I have attached the trigger code and the ddl for the tables.
    Attached Files Attached Files

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I'll stipulate that you are seeing different results on different systems.

    >The whole thing works fine in our test environment. So I don't think there is a problem with the code.

    I wonder what other details you have not posted.

    With all other things being equal, the same code will produce the same results regardless of upon which system the code gets invoked.

    So, one possibility is that the trigger code is really different,
    but we have no way to validate whether the triggers are identical or not.

    Now if the triggers are really the same then something else produces the different results, but we have no way to compare & contrast the 2 systems.

    So, we have to way to ascertain why you are seeing what you report.

    Good Luck!
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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