sp_changesubscriber (Transact-SQL)
適用対象: SQL Server Azure SQL Managed Instance
サブスクライバーのオプションを変更します。 このパブリッシャーのサブスクライバーに対するディストリビューション タスクはすべて更新されます。 このストアド プロシージャは、ディストリビューション データベースの MSsubscriber_info テーブルに書き込みます。 このストアド プロシージャは、パブリッシャー側のパブリケーション データベースで実行されます。
構文
sp_changesubscriber [ @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 ]
[ , [ @publisher = ] 'publisher' ]
引数
[ @subscriber = ] 'subscriber'
オプションを変更するサブスクライバーの名前です。 サブスクライバー は sysname で、既定値はありません。
[ @type = ] type
サブスクライバーの種類です。 type は tinyint で、既定値は NULL です。 0 は、Microsoft SQL Server サブスクライバーを示します。 1 は、非SQL Serverまたはその他の ODBC データ ソース サーバー サブスクライバーを指定します。
[ @login = ] 'login'
SQL Server認証ログイン ID です。login は sysname で、既定値は NULL です。
[ @password = ] 'password'
SQL Server認証パスワードです。 password は sysname で、既定値は %です。 % は、password プロパティに変更がないことを示します。
[ @commit_batch_size = ] commit_batch_size
下位互換性でのみサポートされます。
[ @status_batch_size = ] status_batch_size
下位互換性でのみサポートされます。
[ @flush_frequency = ] flush_frequency
下位互換性でのみサポートされます。
[ @frequency_type = ] frequency_type
配布タスクをスケジュールする頻度を指定します。 frequency_type は int であり、これらの値のいずれかになります。
値 | 説明 |
---|---|
1 | 1 回 |
2 | オン デマンド |
4 | 毎日 |
8 | 週次 |
16 | 月単位 |
32 | 月単位の相対 |
64 | Autostart |
128 | 繰り返し |
[ @frequency_interval = ] frequency_interval
frequency_typeの間隔です。 frequency_interval は int で、既定値は NULL です。
[ @frequency_relative_interval = ] frequency_relative_interval
配布タスクの日付です。 このパラメーターは、 frequency_type が 32 (月単位の相対) に設定されている場合に使用されます。 frequency_relative_interval は int であり、これらの値のいずれかになります。
値 | 説明 |
---|---|
1 | First |
2 | Second |
4 | Third |
8 | 4 番目 |
16 | 末尾 |
[ @frequency_recurrence_factor = ] frequency_recurrence_factor
定義されたfrequency_type中に配布タスクを繰り返す頻度を指定 します。 frequency_recurrence_factor は int で、既定値は NULL です。
[ @frequency_subday = ] frequency_subday
定義された期間中にスケジュールを変更する頻度を指定します。 frequency_subday は int であり、これらの値のいずれかになります。
値 | 説明 |
---|---|
1 | 1 度 |
2 | Second |
4 | 分 |
8 | 時間 |
[ @frequency_subday_interval = ] frequency_subday_interval
frequence_subdayの間隔です。 frequency_subday_interval は int で、既定値は NULL です。
[ @active_start_time_of_day = ] active_start_time_of_day
配布タスクが最初にスケジュールされ、HHMMSS として書式設定された時刻です。 active_start_time_of_day は int で、既定値は NULL です。
[ @active_end_time_of_day = ] active_end_time_of_day
配布タスクのスケジュールが停止する時刻を HHMMSS 形式で指定します。 active_end_time_of_dayは int で、既定値は NULL です。
[ @active_start_date = ] active_start_date
配布タスクが最初にスケジュールされた日付で、YYYYMMDD として書式設定されます。 active_start_date は int で、既定値は NULL です。
[ @active_end_date = ] active_end_date
YYYYMMDD として書式設定された、配布タスクのスケジュールが停止する日付を指定します。 active_end_dateは int で、既定値は NULL です。
[ @description = ] 'description'
省略可能なテキストの説明です。 description は nvarchar(255)で、既定値は NULL です。
[ @security_mode = ] security_mode
実装されているセキュリティ モードです。 security_mode は int であり、これらの値のいずれかになります。
値 | 説明 |
---|---|
0 | SQL Server 認証 |
1 | Windows 認証 |
[ @publisher = ] 'publisher'
SQL Server以外のパブリッシャーを指定します。 publisher は sysname で、既定値は NULL です。
注意
SQL Server パブリッシャーのアーティクル プロパティを変更する場合は、publisher を使用しないでください。
リターン コードの値
0 (成功) または 1 (失敗)
解説
sp_changesubscriber は、すべての種類のレプリケーションで使用されます。
アクセス許可
sysadmin 固定サーバー ロールのメンバーのみがsp_changesubscriber実行できます。
参照
sp_addsubscriber (Transact-SQL)
sp_dropsubscriber (Transact-SQL)
sp_helpdistributiondb (Transact-SQL)
sp_helpserver (Transact-SQL)
sp_helpsubscriberinfo (Transact-SQL)
システム ストアド プロシージャ (Transact-SQL)