Update SysSchedules and SysJobsSchedules

  • Hi,

    I'm trying to update the Job Schedule by updating its system tables (SysSchedule and SysJobSchedules).

    The update statement works fine because I see the correct result in the tables, but when I look in the Job Activity Property window, the changes were not reported.

    Example : I want to update the Next Run time to 11:00:00 in the same day

    update SysJobsSchedules

    set next_run_time = 110000

    where schedule_Id = 123

    Update SysSchedules

    set Active_Start_time = 110000

    where schedule_Id = 123

    it seems that other tables are be involved in the update process.

    Does anyone have a clue ?

    Thanks in advance.

    Sami

  • I tend to try to avoid updating system tables directly unless I have to. It tend to leave me with a steaming pile of melted components or corrupted system databases. Is it absolutely required to do it that way?

    You might be better off using the system stored procedures built specifically to allow you to do just that. Look into sp_add_jobschedule (sql2000) or sp_add_schedule+sp_attach_schedule (Sql2005)

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Hello,

    thanks for you reply.

    After posting my question, I found the system built in stored procedure I needed to do what I want.

    Like you suggested, I tried calling the SP sp_update_jobschedule. I worked perfectly.

    For Info, the SP sp_update_jobschedule is deprecated by another SP named sp_update_schedule. Both do the exact same thing, but in further release, the first one would not exist anymore...

    Regards.

    Sami ASSI

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

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