SQL Agent jobs

  • Hello All,

    How to get a list of all of the agent jobs on the existing server?
    I know that each job has an executable. Then how can we get the executable name and associated schedule?

    Thank you!

  • have you tried looking in msdb?

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • sizal0234 - Wednesday, December 26, 2018 9:00 AM

    Hello All,

    How to get a list of all of the agent jobs on the existing server?
    I know that each job has an executable. Then how can we get the executable name and associated schedule?

    Thank you!

    The tables in msdb have the job information.
    All the jobs would be sysjobs
    Jobs themselves don't have what is being executed - the jobs steps execute commands. And a job can have multiple steps so multiple things being executed. You would find that information in sysjobsteps - the command column.
    Jobs may or may not have a schedule and can have multiple schedules. That information is in sysjobschedules.
    The tables are related on job_id.

    Sue

  • Thank you!

    It helps.

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

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