April 30, 2012 at 7:49 am
We have the change tracking enable on a table and we have a job that runs once in a while and sends out email reports with all changes since the last run.
Some customers want to get notified immediately as each change happens. What will be the best way of doing that?
April 30, 2012 at 7:53 am
Since you aready have a solution that is sending notifications due to change tracking, Instead of adding a trigger or service broker item to send an email immediately, i'd simply schedule that job to run more often than it does now.
since an email is reacted to outside of the SQL server, there's no TRUE reason that it needs to be sent instantly.
schedule it to run every five or ten minutes during biz hours, or even every minute if the table is really receiving that many changes.
Lowell
April 30, 2012 at 8:37 am
Is there a more immediate way? Perhaps an event in CLR that I could catch?
April 30, 2012 at 8:43 am
the true instantaneous way would be a trigger, and your notification (email I assume) would have to be able to report if multiple rows were changed, as well as multiple companyies.
That's probably especially important, since if i updated rows that affected 4 rows for company A and 2 rows for Company B in the same statement, two notifications should go out, right? not 6 notifications(one for each row = email flood)?
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply