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.
Author |
Topic |
funk.phenomena
Posting Yak Master
121 Posts |
Posted - 2013-09-09 : 10:42:02
|
Hi All - I have about 40 jobs loaded in the SQL server agent.Does anyone here know of way to excecute and/or modify SQL agent jobs through t-SQL syntax?Thanks! |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-09-09 : 11:49:24
|
Agent jobs are all stored in MSDB. You can use built-in stored procs such as sp_start_job to run the jobs. http://technet.microsoft.com/en-us/library/ms186757.aspxSome examples here: http://www.interworks.com/blogs/bbickell/2010/01/15/how-execute-and-monitor-agent-job-using-t-sql-sql-server-20052008 |
|
|
|
|
|