what is the best way to run Sql Agent job using C#?
问题 I am using Sql server 2005 and using C#/Asp.Net 4.0 for UI. I want to trigger the sql job from an user action in a webpage. I need to keep checking job's status while its running. There are several old threads on this issue which gets the status of the jobs (How to monitor SQL Server Agent Job info in C#) but i need my program should be able to Run,Stop,Enable,Disable the jobs I need the below functionality in my UI. Check the status of a sql job Run the specified job Stop the job Disable