Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Transact SQL for SQL Agent Job Disable

Author  Topic 

yhchan2005
Starting Member

26 Posts

Posted - 2010-10-14 : 22:50:22
Hi, in BOL, only manage to get the way using Management Studio to enable disable SQL agent job, would like to check what is the transact SQL for Agent job enable + disable.

Thank.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-14 : 23:56:36
You can use sp_update_job for this.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-14 : 23:56:54
Here is a quick example with a loop: http://weblogs.sqlteam.com/tarad/archive/2003/10/17/325.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -