sp_changedistributor_password(Transact-SQL)

적용 대상:SQL ServerAzure SQL Managed Instance

배포자의 암호를 변경합니다. 이 저장 프로시저는 모든 데이터베이스의 배포자에서 실행됩니다. 원격 배포자인 경우 이 배포자를 사용하는 모든 게시자 서버에서 실행해야 합니다. 배포 또는 게시자 데이터베이스가 가용성 그룹에 있는 경우 모든 배포자 및 게시자 노드에서 실행해야 합니다. 노드가 주 노드인지 보조 노드인지는 중요하지 않습니다.

Transact-SQL 구문 표기 규칙

구문

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

인수

[ @password = ] 'password'

새 암호입니다.는 @password 기본값이 없는 sysname입니다. 배포자 로컬인 경우 시스템 로그인의 distributor_admin 암호가 변경됩니다.

반환 코드 값

0 (성공) 또는 1 (실패).

설명

sp_changedistributor_password는 모든 유형의 복제본(replica)에서 사용됩니다.

예제

-- 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;
GO

DECLARE @password NVARCHAR(50) = "YourLongP@$$w0rdHere";

EXEC sp_changedistributor_password @password;
GO

사용 권한

sysadmin 고정 서버 역할의 멤버만 실행할 sp_changedistributor_password수 있습니다.

참고 항목