views:

1500

answers:

2

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!

+1  A: 

Have a look here: SMO Job Class

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

Kyralessa
A: 

Check out:

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

Covers both SMO and T-SQL methods.

Kev