How can I schedule a job in Sql Agent (Sql Server 2005) via C# code?
-
02-07-2019 - |
Question
Hi I'd like to schedule an existing job in the Sql Server 2005 agent via C# code... i.e. when someone clicks a button on an asp.net web page.
How can I do this?
Thanks!
Solution
Have a look here: SMO Job Class
The SQL Server Management Objects (SMO) Class Library lets you do practically anything programmatically in SQL Server.
OTHER TIPS
Check out:
http://msdn.microsoft.com/en-us/library/ms186273(SQL.90).aspx
Covers both SMO and T-SQL methods.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow