Controlling SQL Job through Application? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Controlling SQL Job through Application?

Hi All,
Is there way to control the SQL Server jobs through the application? What we are trying to do is create a UI which will allow users(probably admin level) to check the SQL Server Jobs within a server and should be able to run/stop the job based on job status. I know there are sysjobhistory and other job related tables but I can’t seem to figure out if it can be translated into SP and call from Application. Any help would be really appreciated guys. Thanks, Name
———
Dilli Grg (1 row(s) affected)
Take a look msdb..sp_get_composite_job_info procedure which will help you in this regard…
You don’t need to grant SA for start/stop/see the jobs… Check SQL Agent fixed database roles in BOL…
SQLAgentUserRole
SQLAgentReaderRole
SQLAgentOperatorRole MohammedU.
Moderator
SQL-Server-Performance.com
Thanks MohammedU, I will take a look at that. Thanks, Name
———
Dilli Grg (1 row(s) affected)
]]>