I need to export data from SQL Server when a specific column is updated and wonder if there is some recommended way to do this?
I have a table with an column ‘Activated’, when this value is changed to true an export should be trigged.
I soppose I need a trigger that reacts on changes in the ‘Activated’. And my two options at present is to call the webservice directly from the trigger or let the trigger insert data in a table that my one service reads from and calls the extern service.
Is any of this ideas preferable or is there any other better solution?
you should check out the SQL Server Service Broker – it can be used to trigger external actions on changes to the data.
one implementation (which I have not used) can be found here: http://lab.arc90.com/2009/02/05/sqlwatcher-ad-hoc-database-change-monitoring/