1

We've a simple set of stored procedures that we use for data import in our SQL 2005 db. There's going to be a master SP which will trigger those SP one by one. In past we have used SQL Agent and scheduled a job which in-turn executes the Master SP.

Now, if we want to make it simpler and exclude the dependency for SQL Agent & Job - what are our options?

Here's what I've found so far -

There're a lot of options for this so I believe I'll be able to accomplish the SP execution. Is this the correct/best way?

We also need to figure out some other things like -

  1. How to capture the result(s) from my internal SP execution(i.e. record count, etc..).
  2. With SQL-Job we were able to send emails using SQL-Mail. Any options with this approach?

Ref: http://lunarmedia.com/blogs/lunarmedia_blog/archive/2008/02/04/running-a-stored-procedure-from-windows-task-scheduler.aspx

Hemant Tank
  • 1,724
  • 4
  • 28
  • 56
  • 2
    If I were you I'd stick with SQL Agent. No reason for not using it. With SQL Agent you get the status, notifications and email for free. What would the rational for not using it be. Can't be that it'll be simpler... – Asken Nov 21 '11 at 09:36
  • @Asken One reason could be that the OP is targeting SQL Express, which does not include SQL Agent. Of course I agree that he should give more information, because it isn't clear why he needs to "simplify" and even if he is using SQL Express, buying full SQL Server just for the Agent could still be worthwhile. – Pondlife Nov 21 '11 at 09:43
  • @Pondlife, granted. Let wait for a clarification. – Asken Nov 21 '11 at 09:45
  • 1
    Yep, SQLEXPRESS is one reason and another is not having the full version of SQL-Server with all the features. We want to make it simple and portable and less dependent. – Hemant Tank Nov 21 '11 at 14:38
  • 2
    SQL Express would be the *only* reason. All other SQL Server editions come with SQL Server Agent. – Christian Specht Nov 21 '11 at 15:33

2 Answers2

2

Visual Cron (http://www.visualcron.com/) is quite good for stuff like this - we have it implemented on our Windows servers for all sorts of scheduled tasks. Visibility is better to operational staff as well

Rick
  • 61
  • 1
  • 7
2

There is a codeplex project for SQL Agent which is worth a look

http://standalonesqlagent.codeplex.com/

u07ch
  • 13,324
  • 5
  • 42
  • 48