TSQL: Trigger on Commit
问题 We have a back office system that inserts invoice information into an SQL database via a MSDTC stored procedure, the application inserts header, then the detail information. I have set up a CLR trigger on the header table that fires when a record is inserted. The problem I am having is that the trigger is firing before the COMMIT TRANSACTION meaning that the details information might not be populated, which is required by the process that is triggered. Also if the system fires a ROLLBACK