August 9, 2007 at 10:20 pm
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
August 10, 2007 at 1:03 am
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
January 6, 2009 at 10:29 am
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