Problems with Triggers

  • We have an object that is triggered on a table on update / insert which was working but seems to have stopped.Have checked if enabled etc and cannot see why stopped as it is still enabled - any suggestions?

    Edited by - shaunkelly on 04/25/2003 01:25:07 AM

  • This can mean two things.

    1. The trigger is not getting called at all on modification to table(insert/update).

    2. The trigger gets called but it does not do anything.

    Since you have mentioned that it is enabled, there is less likely that this is related to point 1, instead it looks like problem related to point 2.

    In this case try putting a debug statement (PRINT 'test') in the first line of trigger code and insert/update dummy row and see whether the debug information appears in QA.

  • Was the table on which the trigger is modified or table name changed. Though it might sound stupid, but check the column names within the trigger code it refres to with the tables it needs update/insert.

  • Mod your trigger and add

    Exec master..xp_logevent 60000,'Trigger For Insert Table1 Starting',informational

    Exec master..xp_logevent 60000,'Checking block1 etc.',informational

    Exec master..xp_logevent 60000,'Trigger For Insert Table1 Return!',informational

    Do an update and check the SQL Server log in Enterprise Manager.

    Alternatively if on a development box add a select statement to the trigger similar to above and do an update in QA.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply