[Webinar] Streamline your web hosting managementRegister Today


Timer event within SQL server and asp.net app.

Posted on 2011-05-08
Medium Priority
Last Modified: 2012-06-21
I have an asp.net application with a SQL Server db but the asp.net part is not that important now. But I need an event triggered to invoke an email based upon a timed event automatically in the background.  For simplicity I will form a small test example.  Assume we have SQL Server 2008R2 running.  And we have, through some type of GUI, set a time for "now" (could be anytime now or int he future).  And we want an email sent (or some other event to occur) 2 hours from that time.  Can this be done within SQL Server? Bascially I am looking for SQL Server to time and create an event.  That event will cause something to happen.  More specifically an email to be sent. I don't need all the details on the email, it could be just about anything to happen, like changing the state of a field such as "time expired" Y/N.  The main purpose of this is for this to happen at the server side at any time, once the timer has expired, without any user intervention.  I suppose this could be even framed as, send an email to joe every day at 5:00pm.  Seems like it should be simple I just haven't got it yet and I am not an expert but probably intermediate level asp.net, Sql Server.
Question by:hconant
LVL 22

Accepted Solution

Om Prakash earned 2000 total points
ID: 35715893
you can create and schedule jobs in SQL server. following are some of the pointers:

Author Comment

ID: 35716233
Actually the timer from the SSA Jobs is not exactly what I had in mind.  I need something within the DB that is much more flexible.  So I can set times and trigger events.

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question