Thursday, November 6, 2014

Why they say its difficult to manage software in case where database triggers are used

Came across a problem where an insert query was failing to write to a table with error - Duplicate primary key. Interesting part was that the table did not have a primay key. After spending some time it was noticed that there were two trigger configured for the table. One for insert and other for update. The insert trigger writes the same record in some other table which had the primary key constrain which was failing if the same insert query is executed twice. 

No comments:

Post a Comment