sp_changesubscriber_schedule (Transact-SQL)
更改订阅服务器的分发代理或合并代理调度。 此存储过程在发布服务器的任何数据库中执行。
语法
sp_changesubscriber_schedule [ @subscriber = ] 'subscriber', [ @agent_type = ] type
[ , [ @frequency_type = ] frequency_type ]
[ , [ @frequency_interval = ] frequency_interval ]
[ , [ @frequency_relative_interval = ] frequency_relative_interval ]
[ , [ @frequency_recurrence_factor = ] frequency_recurrence_factor ]
[ , [ @frequency_subday = ] frequency_subday ]
[ , [ @frequency_subday_interval = ] frequency_subday_interval ]
[ , [ @active_start_time_of_day = ] active_start_time_of_day ]
[ , [ @active_end_time_of_day = ] active_end_time_of_day ]
[ , [ @active_start_date = ] active_start_date ]
[ , [ @active_end_date = ] active_end_date ]
[ , [ @publisher = ] 'publisher' ]
参数
[ @subscriber = ] 'subscriber'
订阅服务器的名称。 订阅服务器 为 sysname。 订阅服务器的名称必须在数据库中唯一,不能已经存在,不能为 NULL。
[ @agent_type = ] type
代理的类型。 类型 为 smallint,默认值为 0。 0 表示分发代理。 1 表示合并代理。
[ @frequency_type = ] frequency_type
计划分发任务的频率。 frequency_type为 int,默认值为 64。 有 10 个计划列。
[ @frequency_interval = ] frequency_interval
应用于frequency_type设置的频率的值。 frequency_interval为 int,默认值为 1。
[ @frequency_relative_interval = ] frequency_relative_interval
分发任务的日期。 frequency_relative_interval为 int,默认值为 1。
[ @frequency_recurrence_factor = ] frequency_recurrence_factor
frequency_type使用的重复因子。 frequency_recurrence_factor为 int,默认值为 0。
[ @frequency_subday = ] frequency_subday
在定义的时间段内重新安排的频率(以分钟为单位)。 frequency_subday为 int,默认值为 4。
[ @frequency_subday_interval = ] frequency_subday_interval
frequency_subday的间隔。 frequency_subday_interval为 int,默认值为 5。
[ @active_start_time_of_day = ] active_start_time_of_day
首次计划分发任务的时间。 active_start_time_of_day为 int,默认值为 0。
[ @active_end_time_of_day = ] active_end_time_of_day
分发任务停止计划的时间。 active_end_time_of_day为 int,默认值为 235959,这意味着下午 11:59:59(下午 24 小时)。
[ @active_start_date = ] active_start_date
首次计划分发任务的日期,格式为 yyyyMMdd
。 active_start_date为 int,默认值为 0。
[ @active_end_date = ] active_end_date
分发任务停止计划的日期,格式为 yyyyMMdd
。 active_end_date为 int,默认值99991231
为 9999 年 12 月 31 日。
[ @publisher = ] 'publisher'
指定非 Microsoft SQL Server 发布服务器。 publisher 为 sysname,默认值为 NULL。
注意
更改 SQL Server 发布服务器上的项目属性时,不应使用 publisher 。
返回代码值
0 (成功) 或 1 (失败)
注解
sp_changesubscriber_schedule用于所有类型的副本 (replica)。
权限
只有 sysadmin 固定服务器角色的成员才能执行sp_changesubscriber_schedule。
另请参阅
sp_addsubscriber_schedule (Transact-SQL)
系统存储过程 (Transact-SQL)
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈