Share via


sp_changedistributor_password (Transact-SQL)

ディストリビュータのパスワードを変更します。このストアド プロシージャは、ディストリビュータ側で任意のデータベースについて実行されます。

トピック リンク アイコンTransact-SQL 構文表記規則

構文

sp_changedistributor_password [ @password= ] 'password' 

引数

  • [ @password=] 'password'
    新しいパスワードです。passwordsysname であり、既定値はありません。ディストリビュータがローカルの場合は、distributor_admin システム ログインのパスワードが変更されます。

解説

sp_changedistributor_password は、すべての種類のレプリケーションで使用します。

権限

sp_changedistributor_password を実行できるのは、固定サーバー ロール sysadmin のメンバだけです。

戻り値

成功した場合は 0 を、失敗した場合は 1 をそれぞれ返します。

使用例

-- Change the password on the Distributor. 
-- To avoid storing the password in the script file, the value is passed 
-- into SQLCMD as a scripting variable. For information about how to use 
-- scripting variables on the command line and in SQL Server Management
-- Studio, see the "Executing Replication Scripts" section in the topic
-- "Programming Replication Using System Stored Procedures".
USE master
EXEC sp_changedistributor_password $(Password)
GO

参照

関連項目

sp_adddistributor (Transact-SQL)
レプリケーション ストアド プロシージャ (Transact-SQL)

その他の技術情報

レプリケーションのセキュリティ設定を表示および変更する方法 (レプリケーション Transact-SQL プログラミング)
ディストリビュータの保護

ヘルプおよび情報

SQL Server 2005 の参考資料の入手