I have a trigger on a table that just updates a last_modified_date and this works fine on our production server. Now I have to update some data and I do not want the trigger to fire. I cannot disable or drop the trigger because the productions systems needs the trigger. Anyone an idea of how to solve this problem?
I don't think there's an easy way (if any) to bypass a trigger. It's advantage of being so close on the source makes it less handy in your case. Perhaps you could tell us more about what you're after and let us in a little on the table structure, we might come up with another idea.
Well, it's just a table containing customer info (name, address, ...). The call-center uses a web application to update this info. Everytime an update is performed, the last_modified date is updated through a trigger (which fires after insert and update). Every day a report is generated that contains the records updated on the previous day.
I have now some info that I want to update, but the modification_date should be yesterday, but this is impossible because of the trigger. I cannot disable the trigger, as the call-center is using the database as well.
You could upload the data into a temporary table from a spreadsheet, (the same structure as the table you want to update) and then use an SQL script to perform the update. Although you would still have to disable the trigger, it would update the records in seconds and could be arranged with your call centre people or set up as a DTS to run at a certain time.
I don't have a really good idea on this but perhaps it's possible to temporarily change the existing trigger to check for the system_user. If it's you, then don't update.
EDIT: As nomis suggests, if you can disable the trigger temporarily and the users agree, go for that (is it just me or is dbforums have real difficulty processing edit's ?).