简体   繁体   中英

How can I schedule a job in Sql Agent (Sql Server 2005) via C# code?

Hi I'd like to schedule an existing job in the Sql Server 2005 agent via C# code... ie when someone clicks a button on an asp.net web page.

How can I do this?

Thanks!

Have a look here: SMO Job Class

The SQL Server Management Objects (SMO) Class Library lets you do practically anything programmatically in SQL Server.

Check out:

http://msdn.microsoft.com/en-us/library/ms186273(SQL.90).aspx

Covers both SMO and T-SQL methods.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM