dbo.sysjobsteps (Transact-SQL)

 

Updated: August 9, 2016

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Contains the information for each step in a job to be executed by SQL Server Agent. This table is stored in the msdb database.

Column nameData typeDescription
job_iduniqueidentifierID of the job.
step_idintID of the step in the job.
step_namesysnameName of the job step.
subsystemnvarchar(40)Name of the subsystem used by SQL Server Agent to execute the job step.
commandnvarchar(max)Command to be executed by subsystem.
flagsintReserved.
additional_parametersntextReserved.
cmdexec_success_codeintError-level value returned by CmdExec subsystem steps to indicate success.
on_success_actiontinyintAction to be performed when a step is executed successfully.
on_success_step_idintID of the next step to execute when a step is executed successfully.
on_fail_actiontinyintAction to be performed when a step is not executed successfully.
on_fail_step_idintID of the next step to execute when a step is not executed successfully.
serversysnameReserved.
database_namesysnameName of the database in which command is executed if subsystem is TSQL.
database_user_namesysnameName of the database user whose account will be used when executing the step.
retry_attemptsintNumber of retry attempts made if the step fails.
retry_intervalintAmount of time to wait between retry attempts.
os_run_priorityintReserved.
output_file_namenvarchar(200)Name of the file in which the step's output is saved when subsystem is TSQL, PowerShell, or CmdExec.
last_run_outcomeintOutcome of the previous execution of the job step.

 0 = Failed

 1 = Succeeded

 2 = Retry

 3 = Canceled

 5 = Unknown
last_run_durationintDuration (hhmmss) of the step the last time it ran.
last_run_retriesintNumber of retry attempts in the last execution of the job step.
last_run_dateintDate (yyyymmdd) the step last started execution.
last_run_timeintTime (hhmmss) the step last started execution.
proxy_idintProxy for the job step.
step_uiduniqueidentifierIdentifier for the job step.

SQL Server Agent Tables (Transact-SQL)

Community Additions

ADD
Show: