sp_changesubscriber_schedule (Transact-SQL)

適用於:SQL ServerAzure 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' 這是訂閱者的名稱。 subscribersysname。 訂閱者的名稱在資料庫中必須是唯一的,不能已經存在,而且不能是 NULL。

[ @agent_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。

[ @active_start_date = ] active_start_date 這是第一次排程散發工作的日期,格式為 yyyyMMdd active_start_date為 int,預設值為 0

[ @active_end_date = ] active_end_date 這是散發工作停止排程的日期,格式為 yyyyMMddactive_end_date為 int,預設值99991231為 ,表示 9999 年 12 月 31 日。

[ @publisher = ] 'publisher' 指定非 Microsoft SQL Server 發行者。 publishersysname,預設值為 NULL。

注意

變更 SQL Server 發行者上的發行項屬性時,不應該使用 publisher

傳回碼值

0 (成功) 或 1 (失敗)

備註

sp_changesubscriber_schedule用於所有類型的複寫。

權限

只有系統管理員固定伺服器角色的成員可以執行sp_changesubscriber_schedule

另請參閱

sp_addsubscriber_schedule (Transact-SQL)
系統預存程序 (Transact-SQL)