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

Thread: Trigger Error

  1. #1
    Join Date
    Dec 2002
    Location
    Singapore
    Posts
    27

    Trigger Error

    Hi All,
    I'm having a problem with a trigger.This trigger is used to write details in to audit tables whenever there is an update of this table-usr_profile_dtl.
    the name of the audit table is usr_profile_dtl_aud
    trigger name is TR_PRE_UPD_USR_PROFILE_DTL
    please find enclosed the attached trigger as below.The problem here is there are 2 environments here one is development and other one is SIT.In devmt it is working fine but in SIT the error messages is as stated below.
    The error states that it cannot insert NULL into this table "USR_PROFILE_DTL_AUD"."AUDIT_USER_ID"(it's a before update trigger)

    The error message is as follows:
    [28 Jul 2004 15:59:57,122]ERROR (UserProfileData.java:changePassword:3623) - ORA-01400: cannot insert NULL into ("MRM2".
    "USR_PROFILE_DTL_AUD"."AUDIT_USER_ID")
    ORA-06512: at "MRM2.TR_PRE_UPD_USR_PROFILE_DTL", line 6
    ORA-04088: error during execution of trigger 'MRM2.TR_PRE_UPD_USR_PROFILE_DTL'

    java.sql.SQLException: ORA-01400: cannot insert NULL into ("MRM2"."USR_PROFILE_DTL_AUD"."AUDIT_USER_ID")
    ORA-06512: at "MRM2.TR_PRE_UPD_USR_PROFILE_DTL", line 6
    ORA-04088: error during execution of trigger 'MRM2.TR_PRE_UPD_USR_PROFILE_DTL'

    Any body have any idea of how to rectify this error.Any advice would be great.
    Thanks,
    K.M.Ramakrishnan

  2. #2
    Join Date
    Sep 2003
    Location
    over the hill and through the woods
    Posts
    995
    What's the difference between a Primary Key and a Unique key? Get that answer and you will have solved your problem
    Oracle it's not just a database it's a lifestyle!
    --------------
    BTW....You need to get a girlfriend who's last name isn't .jpg

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