What is sysjobschedules in SQL 2005?

  • Hi All,

    I have a script which works well for SQL 2000. It references sysjobschedules in MSDB and columns like

    freq_type
    freq_interval
    freq_subday_type
    freq_subday_interval
    freq_relative_interval
    freq_recurrence_factor

    in it. Do we have any table corresponding to this in 2005? The script is failing because in 2005 the sysjobschedules only has columns

    schedule_id

    job_id

    next_run_date

    next_run_time

    Thanks in advance.

    -Amit

  • Found the answer after digging a bit in BOL.

    There is a table named sysschedules which can be used and the relation between sysjobs, sysjobschedules and sysschedules is

    sysjobs.job_id = sysjobschedules.job_id

    and

    sysschedules.schedule_id = sysjobschedules.schedule_id

    -Amit

  • Thanks Amit.

    Useful tip as I have caught out by this one too.

    sysjobschedules compatibility view does not return all of the fields that the system table in SQL 2000 has. There are useful articles like "Mapping SQL Server 2000 System Tables to SQL Server 2005 System Views" but the msdb database seems to have been overlooked.

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

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