sql/script to list jobs and schedules

  • I had a nice script for sql 2000 which would show all sql agent jobs, steps and schedules. Of course under 2005 won't work. I know the 3 tables below

    select * from dbo.sysjobs

    select * from sysjobsteps

    select * from sysjobschedules

    It is an easy link, where I am lost is when linking the jobs to the schedules is how to drive and when and how often?

  • Joc activity monitor will giev you all jobs with last run date and future run date , will you need more.

    Regards
    Durai Nagarajan

  • Yes, I am looking for a schdule in a readable format which shows when each job is scheduled. I use to manipulate sysjobscheduled which is gone now

  • This is right in MSDB: dbo.sysjobschedules

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Yes it is there but they took out all the columns to manipulate, only 4 colums

  • I guess I'm confused, the job_id is right there along with the next run datetime. What else are you looking for?

    If you need a literal breakdown of the schedule, try looking at sysschedules.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks that was the missing table I needed

  • Cool. Glad I could help.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • If you need a literal breakdown of the schedule, try looking at sysschedules.

    Except that in SQL 2000 there is no sysschedules table. What worked for me was this: http://solihinho.wordpress.com/2009/01/01/query-for-listing-sql-server-job-schedule/[/url]

  • Marek Grzymala (12/30/2013)


    If you need a literal breakdown of the schedule, try looking at sysschedules.

    Except that in SQL 2000 there is no sysschedules table. What worked for me was this: http://solihinho.wordpress.com/2009/01/01/query-for-listing-sql-server-job-schedule/[/url]

    Except this was specifically a question for 2005. Look at the original question. The OP had a script for 2000.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 10 posts - 1 through 9 (of 9 total)

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