Quantcast
Channel: Question and Answer » transaction
Viewing all articles
Browse latest Browse all 35

Trigger/Event that fires when a Transaction finishes

$
0
0

I have a query that pulls from about 15 different tables. I am looking to materialize this into a table that stores it in xml/json. (To improve performance.)

The problem I have is that these tables are updated by several processes. I am looking for a way to keep this in SQL Server if possible.

Ideally, I would love it if SQL Server had a trigger that would fire right before a transaction commits, so I could look at the tables and records that were affected and know if I need to update the “result” table.

Is there something like that in SQL Server?

NOTE: I have considered using the INSTEAD OF trigger, but I have no way of knowing the order of the tables in the transaction, so if the transaction updates all 15 tables, then I will be updating the “result” table 15 times for the same row.


Viewing all articles
Browse latest Browse all 35

Trending Articles