sp_changesubscriber_schedule (Transact-SQL)

更改订阅服务器的分发代理或合并代理调度。此存储过程在发布服务器的任何数据库中执行。

主题链接图标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'
    订阅服务器的名称。subscriber 的数据类型为 sysname。订阅服务器的名称必须在数据库中唯一,不能已经存在,不能为 NULL。
  • [ @agent_type=] type
    代理的类型。type 的数据类型为 smallint,默认值为 00 指示分发代理。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,表示 24 小时制的 11:59:59 P.M.。
  • [ @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 发布服务器。publishersysname,默认值为 NULL。

    注意 更改 SQL Server 发布服务器上的项目属性时,不应使用 publisher

返回代码值

0(成功)或 1(失败)

备注

sp_changesubscriber_schedule 用于所有类型的复制。

权限

只有 sysadmin 固定服务器角色成员才能执行 sp_changesubscriber_schedule

请参阅

参考

sp_addsubscriber_schedule (Transact-SQL)
系统存储过程 (Transact-SQL)

帮助和信息

获取 SQL Server 2005 帮助