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'
    這是訂閱者的名稱。subscribersysname。訂閱者的名稱在資料庫中必須是唯一的,絕不能已經存在,而且不能是 NULL。
  • [ @agent_type=] type
    這是代理程式的類型。typesmallint,預設值是 00 表示散發代理程式。1 表示合併代理程式。
  • [ @frequency_type=] frequency_type
    這是散發工作的排程頻率。frequency_typeint,預設值是 64。共有 10 個排程資料行。
  • [ @frequency_interval=] frequency_interval
    這是 frequency_type 設定的頻率所套用的值。frequency_intervalint,預設值是 1
  • [ @frequency_relative_interval=] frequency_relative_interval
    這是散發工作的日期。frequency_relative_intervalint,預設值是 1
  • [ @frequency_recurrence_factor=] frequency_recurrence_factor
    這是 frequency_type 所用的循環因數。frequency_recurrence_factorint,預設值是 0
  • [ @frequency_subday=] frequency_subday
    在定義的期間內,重新排程的頻率 (以分鐘為單位)。frequency_subdayint,預設值是 4
  • [ @frequency_subday_interval=] frequency_subday_interval
    這是 frequency_subday 的間隔。frequency_subday_intervalint,預設值是 5
  • [ @active_start_time_of_day=] active_start_time_of_day
    這是第一次排程散發工作的當日時間。active_start_time_of_dayint,預設值是 0
  • [ @active_end_time_of_day=] active_end_time_of_day
    這是停止排程散發工作的當日時間。active_end_time_of_dayint,預設值是 235959,表示 24 小時制的下午 11:59:59。
  • [ @active_start_date=] active_start_date
    這是第一次排程散發工作的日期,格式為 YYYYMMDD。active_start_dateint,預設值是 0
  • [ @active_end_date=] active_end_date
    這是停止排程散發工作的日期,格式為 YYYYMMDD。active_end_dateint,預設值是 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 協助