sp_help_job returns information about jobs that are used by SQLServerAgent service to perform automated activities in SQL Server. When executed sp_help_job procedure with no parameters to return the information for all of the jobs currently defined in the msdb database.
EXEC MSDB.DBO.sp_HELP_JOB
Reference : Pinal Dave (http://blog.SQLAuthority.com) , BOL










Sorry Sir,
I dont have any idea about the SQL Server Agent Jobs… So please expain me what it is? and where it is used ?
with example…
Regards
Wilson Gunanithi . J
nice tip
Hi, I’m a newbie and
I need a sql server agent query that will give me
job name, owner name, etc….sql 2005. Do you have one?
Hi,
Check the msdb.dbo.sysjobs table.
Regards,
Pinal Dave
Hi ,
My job is failing every day .
The error message in sql server logs is :
initerrlog: Could not open error log file ‘R:\Microsoft SQL
Server\MSSQL.1\MSSQL\LOG\ERRORLOG’. Operating system error = 3(The system
cannot find the path specified.).
Please some one help me..
Hi Pinal,
Nice tip. Thanks.
sp_help_job is giving current_execution_status, which is giving the current execution status of the job. And this stored procedure internally uses xp_sqlagent_enum_jobs to get the current execution status.
I would want to extract the execution status or currently running jobs from tables. Am not allowed to use any procedures. So could you please help me to get the execution status from table? or what is happening inside of the procedure xp_sqlagent_enum_jobs?
Hi Pinal,
I am new in SQL Server so please bear with me.
I have a question regarding proxy a/c permissions with SQL Server Agent job:
i am logged in as user1 with sysadmin privillages, created a job with owner user2 who only have public permissions. Used same a/c to create proxy a/c which i used in user2′s agent job.
Agent job is just fetching new rows from one server and transferring them into another.
i was thinking that wont be sucessful because user2 didnt have any sysadmin or agentjob roles(just had public privilage). But job got executed sucessfully and it did transfer rows to other server as well.
My query is that why it happened?
And could you please tell me what minimum permissions i need to give to login to run a multiserver job.
Thanks in advance Pinal.
thanks u ..