http://www.sqlservercentral.com/blogs/sql_server_dba/2012/02/28/sql-server-agent-job-steps-/

Printed 2014/08/29 02:20PM

SQL Server Agent Job Steps

2012/02/28

To list a SQL Server Agent Job Steps use the T-SQL example below.

This example displays the step id, SQL Server Agent Job name, Step name.

The code has 1 input parameter - @job_name

 

DECLARE @job_name VARCHAR(128)
SET @job_name = 'My SQL Server Agent Job'
SELECT js.step_id ,j.name,js.step_name FROM sysjobsteps js inner join sysjobs j 
ON js.job_id=j.job_id 
WHERE j.name = @job_name ORDER BY step_id

 

See Also

SQL Server agent fixed roles

SQL Agent Jobs – Schedule in seconds


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.