我有一组 SQL 服务器作业,我希望它们的计划是动态的,即我希望下一个运行日期来自表。
我已经尝试 next_run_date在sysjobschedules表格和表格next_scheduled_run_date中 进行更新,sysjobactivity但这并没有做任何事情。
我该怎么办?
我有一组 SQL 服务器作业,我希望它们的计划是动态的,即我希望下一个运行日期来自表。
我已经尝试 next_run_date在sysjobschedules表格和表格next_scheduled_run_date中 进行更新,sysjobactivity但这并没有做任何事情。
我该怎么办?
我认为您可以使用 -sp_update_schedule来更新时间表。
sp_update_schedule
{ [ @schedule_id = ] schedule_id
| [@name =]'schedule_name'}
[ , [ @new_name = ] 新名称 ]
[ , [ @enabled = ] 已启用 ]
[ , [ @freq_type = ] freq_type ]
[ , [ @freq_interval = ] freq_interval ]
[ , [ @freq_subday_type = ] freq_subday_type ]
[ , [ @freq_subday_interval = ] freq_subday_interval ]
[ , [ @freq_relative_interval = ] freq_relative_interval ]
[ , [ @freq_recurrence_factor = ] freq_recurrence_factor ]
[ , [ @active_start_date = ] active_start_date ]
[ , [ @active_end_date = ] active_end_date ]
[ , [ @active_start_time = ] active_start_time ]
[ , [ @active_end_time = ] active_end_time ]
[ , [ @owner_login_name = ] 'owner_login_name' ]
[ , [ @automatic_post =] automatic_post ]