Jump to content

How to trigger a program after certain database activity - Fure and forget.


Recommended Posts

Guest /u/MarmosetRevolution
Posted

Suppose we have a database base table containing raw data that needs significant processing. This processing includes web api calls, sending emails, and other resource intensive work.

 

Do to the complexity of the work, a CLR trigger or stored procedure is a nightmare to install (And it's too long running to block execution on an INSERT)

 

I've wrapped everything in a simple C# console app that is simply a call to MyClassLib.Helper.DoTheWork(); (Which can easily be made async)

 

What's the best way to trigger this execution in a timely manner after an insert?

 

I could have Task Manager run it every so often. But that means spinning up the environment needlessly when there's no data to process, and it doesn't necessarily respond in a timely manner after update.

 

What I'd really like is for the database (SQL server) to fire an event and for something to catch that event and begin execution. Unfortunately, I don't even know where to begin looking for a solution.

 

submitted by /u/MarmosetRevolution

[link] [comments]

 

Continue reading...

  • Replies 0
  • Created
  • Last Reply

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...