Applies To: SQL Server
Changes security properties of a Log Reader agent. This stored procedure is executed at the Publisher on the publication database.
sp_changelogreader_agent [ [ @job_login = ] 'job_login' ] [ , [ @job_password = ] 'job_password' ] [ , [ @publisher_security_mode = ] publisher_security_mode ] [ , [ @publisher_login = ] 'publisher_login' ] [ , [ @publisher_password = ] 'publisher_password' ] [ , [ @publisher = ] 'publisher' ]
[ @job_login= ] 'job_login'
Is the login for the Windows account under which the agent runs. job_login is nvarchar(257), with a default of NULL. This cannot be changed for a non-Microsoft SQL Server publisher.
[ @job_password= ] 'job_password'
Is the password for the Microsoft Windows account under which the agent runs. job_password is sysname, with a default of NULL.
[ @publisher_security_mode= ] publisher_security_mode
Is the security mode used by the agent when connecting to the Publisher. publisher_security_mode is smallint, with a default of NULL. 0 specifies SQL Server Authentication, and 1 specifies Windows Authentication.
[ @publisher_login= ] 'publisher_login'
Is the login used when connecting to the Publisher. publisher_login is sysname, with a default of NULL. publisher_login must be specified when publisher_security_mode is 0. If publisher_login is NULL and publisher_security_mode is 1, then the Windows account specified in job_login is used when connecting to the Publisher.
[ @publisher_password= ] 'publisher_password'
Is the password used when connecting to the Publisher. publisher_password is sysname, with a default of NULL.
[ @publisher= ] 'publisher'
Is the name of the Publisher. publisher is sysname, with a default of NULL. This parameter is only supported for non-SQL Server Publishers.
0 (success) or 1 (failure)
sp_changelogreader_agent is used in transactional replication.
sp_changelogreader_agent is used to change the Windows account under which a Log Reader agent runs. You can change the password of an existing Windows login or supply a new Windows login and password.
After changing an agent login or password, you must stop and restart the agent before the change takes effect.
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_changelogreader_agent.