Create a new job in SQL Server 2005 with the use of code
How ca开发者_运维知识库n you create a new job in SQL Server 2005 with the use of code? And not in SQL Server Management Studio.
There's a series of system stored procedures that you should use as detailed on MSDN:
sp_add_job
sp_add_jobstep
Plus a couple more for settings up schedules.
To see how it's done by example, you can make a job in Management Studio, then right-click / script the job out to a query window.
精彩评论