Agent job and step name

  • Is there a way, from within an agent job, to programatically access both the job name and the step name of that job?

  • Yes, Google for "SQL Agent Tokens".

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • you can run this query and filter on the job_id

    SELECT * FROM dbo.sysjobsteps

    QUIGROUP- Need a Certified experienced DBA for a project or troubleshooting? Need help with programming, database recovery, performance tuning, ETL, SSRS or developing new databases? Contact us.. 1-786-273-9809

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply