Send notification on current values in table

  • I'm not much of a programmer, but was looking for some ideas on what I'm trying to accomplish:

    I'd like to monitor a table, and do a select on that table to find out if 2 values are present such as this SELECT STARTED, WORKING FROM TABLE WHERE STARTED => '1' and WORKING => '1' (and include that this condition has been present for over 5 minutes)

    If this condition is met then email out (cdosys) 'App Messages Stuck'

    Appreciate feedback.

  • Sounds like something very simple. Create a job to monitor the table via a TSQL query, and send the mail if conditions are (or aren't) met. What I would do if tasked, however, is probably create a web service to handle the business logic...there are probably other types of sendmail type objects deployed in your company's BLL, so no reason to reinvent the wheel by recreating the mail logic again.

    Did I just type this? I can't believe that all of the coders on these dev teams that I work with have me now convinced to leave business logic out of the database! On second thought, use option one. 😀

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply