sp_addsubscriber (Transact-SQL)
SQL Server 2008 R2
將訂閱者加入發行者中,使它能夠接收發行集。針對快照集和交易式發行集,這個預存程序執行於發行集資料庫的發行者端;如果是使用遠端散發者的合併式發行集,這個預存程序便執行於散發者端。
重要事項 |
|---|
這個預存程序已被取代。您已不需要在發行者端明確登錄訂閱者。 |
sp_addsubscriber [ @subscriber = ] 'subscriber'
[ , [ @type = ] type ]
[ , [ @login = ] 'login' ]
[ , [ @password = ] 'password' ]
[ , [ @commit_batch_size = ] commit_batch_size ]
[ , [ @status_batch_size = ] status_batch_size ]
[ , [ @flush_frequency = ] flush_frequency ]
[ , [ @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 ]
[ , [ @description = ] 'description' ]
[ , [ @security_mode = ] security_mode ]
[ , [ @encrypted_password = ] encrypted_password ]
[ , [ @publisher = ] 'publisher' ]
sp_addsubscriber 用於快照式複寫、交易式複寫和合併式複寫中。
當訂閱者只會有合併式發行集的匿名訂閱時,不需要 sp_addsubscriber。
sp_addsubscriber 會寫入 distribution 資料庫的 MSsubscriber_info 資料表中。
重要事項