Applies To: SQL Server 2014, SQL Server 2016 Preview
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Changes the Distribution Agent or Merge Agent schedule for a subscriber. This stored procedure is executed at the Publisher on any database.
Transact-SQL Syntax Conventions
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 '
Is the name of the Subscriber.
subscriber is sysname. The name of the Subscriber must be unique in the database, must not already exist, and cannot be NULL.
Is the type of agent.
type is smallint, with a default of 0. 0 indicates a Distribution Agent. 1 indicates a Merge Agent.
Is the frequency with which to schedule the distribution task.
frequency_type is int, with a default of 64. There are 10 schedule columns.
Is the value applied to the frequency set by
frequency_type. frequency_interval is int, with a default of 1.
Is the date of the distribution task.
frequency_relative_interval is int, with a default of 1.
Is the recurrence factor used by
frequency_type. frequency_recurrence_factor is int, with a default of 0.
Is how often, in minutes, to reschedule during the defined period.
frequency_subday is int, with a default of 4.
Is the interval for
frequency_subday. frequency_subday_interval is int, with a default of 5.
Is the time of day when the distribution task is first scheduled.
active_start_time_of_day is int, with a default of 0.
Is the time of day when the distribution task stops being scheduled.
active_end_time_of_day is int, with a default of 235959, which means 11:59:59 P.M. on a 24-hour clock.
Is the date when the distribution task is first scheduled, formatted as YYYYMMDD.
active_start_date is int, with a default of 0.
Is the date when the distribution task stops being scheduled, formatted as YYYYMMDD.
active_end_date is int, with a default of 99991231, which means December 31, 9999.
@publisher= ] ' publisher '
Specifies a non-Microsoft SQL Server Publisher.
publisher is sysname, with a default of NULL.
publisher should not be used when changing article properties on a SQL Server Publisher.
0 (success) or 1 (failure)
sp_changesubscriber_schedule is used in all types of replication.
Only members of the
sysadmin fixed server role can execute sp_changesubscriber_schedule.