Interacting with Sql Server jobs programmatically
I would like to be able to interact with a Sql Server job programmatically through a web page.
What is the best way to do this? Through SMO? The job will take a long time to run, so it needs to fire and forget, and I would also like to be able to stop it.
If SMO, 开发者_JAVA技巧can anybody point me to an easy tutorial? Google gave me some fairly basic stuff but nothing substantial...
SQL Server 2008, ASP.NET MVC web app.
If PowerShell is an option, take a look at these scripts.
If you want to do it via .NET code, take a look at this - a very basic example for you to start and stop jobs by name.
精彩评论