SQL 2008 - Migrating job schedules

  • How to move job schedules from sql 2000/sql2005 to sql 2008 server. I have moved the jobs (sysjobs).

  • any reason you cannot script the jobs out via the gui?

    unless they are maintenance plan jobs in which case you are best off recreating the maintenance plans

    ---------------------------------------------------------------------

  • scripting out individual jobs is cumbersome when we have 1000+ jobs. We copied the sysjobs (not all jobs, 850+ only) to target server and now we have to move the schedules for 850+ jobs

    i could insert a schedule for few job manually. But since, schedule_id in sysschedule is identity, cannot just insert records from sysschedule to sysschedule table

  • highlight the jobs in object explorer (F7) you can script them all out in one go.

    ---------------------------------------------------------------------

  • Job move is already over. Cant go back and recreate them now. Thts the reason got stuck in this.

  • Adding a schedule to a job requires separate proc calls from adding the job. On the source select from msdb.dbo.sysschedules and from msdb.dbo.sysjobschedules to build the relevant calls to msdb.dbo.sp_add_schedule and msdb.dbo.sp_add_jobschedule respectively that you can then copy and paste to run in a new query window connected to your new instance. Just make sure to use the @job_name parameter for msdb.dbo.sp_add_jobschedule instead of @job_id since the ids will differ between the two servers.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 6 posts - 1 through 5 (of 5 total)

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