Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 2.19 KB

sp-changedistributor-password-transact-sql.md

File metadata and controls

61 lines (43 loc) · 2.19 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_changedistributor_password (Transact-SQL)
Changes the password for a Distributor.
markingmyname
maghan
randolphwest
06/08/2023
sql
replication
reference
sp_changedistributor_password
sp_changedistributor_password_TSQL
sp_changedistributor_password
TSQL

sp_changedistributor_password (Transact-SQL)

[!INCLUDE SQL Server SQL MI]

Changes the password for a Distributor. This stored procedure is executed at the Distributor on any database. If this is a remote Distributor, then it needs to be run on all the Publisher servers that are using this Distributor. If the distribution or Publisher database is in an availability group, then it needs to be run on all the Distributor and Publisher nodes. It doesn't matter if the node is primary or secondary.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_changedistributor_password [ @password = ] 'password'
[ ; ]

Arguments

[ @password = ] 'password'

The new password. @password is sysname, with no default. If the Distributor is local, the password of the distributor_admin system login is changed.

Return code values

0 (success) or 1 (failure).

Remarks

sp_changedistributor_password is used in all types of replication.

Examples

:::code language="sql" source="../replication/codesnippet/tsql/sp-changedistributor-pas_1.sql":::

Permissions

Only members of the sysadmin fixed server role can execute sp_changedistributor_password.

See also