Click to See Complete Forum and Search --> : Starting a SqlServer Job from a Web Page


Scott.Macmaster
May 31st, 2007, 02:39 PM
We have a job in SQL Server that runs every night to update enrollment statistics. On days where we have a lot of enrollments or changes some people would like to see updated statistics. Instead of calling me and asking me to log into Enterprise Manager and run the job, I'd like them to open up a web page a click a button. I don't need the webpage to wait for the job to finish. Espacially, since it takes 10-20 minutes to finish. I can't seem to find any info on how to do this. Does anyone have any idea?


Thanks,
Scott

Shuja Ali
May 31st, 2007, 11:15 PM
There is a Stored Procedure called sp_start_job . You can use this Stored Procedure to start a SQL Job. Take a look at SQL Server books online for exact syntax and usage.