Microsoft KB Archive/911305

= Replication agent jobs may fail after you change the SQL Server Agent service startup account by using the Windows Service Control Manager in SQL Server 2005 =

Article ID: 911305

Article Last Modified on 10/17/2006

-

APPLIES TO


 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Workgroup Edition

-



Bug #: 413203 (SQLBUDT)



SYMPTOMS
Consider the following scenario. On a computer that is running Microsoft SQL Server 2005, you use the Microsoft Windows Service Control Manager instead of SQL Server Configuration Manager to change the startup account of the SQL Server Agent service to a domain account. Then, you try to run a replication agent job. When you do this, the replication agent job may fail and you may receive an error message that is similar to the following:

Executed as user: . Replication-Replication Snapshot Subsystem: agent  failed. Executed as user: . A required privilege is not held by the client. The step failed. [SQLSTATE 42000] (Error 14151). The step failed.



CAUSE
This problem occurs because the Windows Service Control Manager cannot grant the required permissions to run replication agent jobs to the new domain account.



RESOLUTION
To resolve this problem, use SQL Server Configuration Manager to change the domain account back to a startup account. Then, use SQL Server Configuration Manager to change the startup account to a domain account. When you do this, SQL Server Configuration Manager will add the domain account to the following security group:

SQLServer2005SQLAgentUser$ $

Therefore, SQL Server Configuration Manager will grant the required permissions to run replication agent jobs to the domain account.

To avoid this problem in the future, we recommend that you use SQL Server Configuration Manager instead of the Windows Service Control Manager to modify startup accounts.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
If you change the startup password of the SQL Server Agent service in the Microsoft Windows Service Control Manager instead of in the SQL Server Configuration Manager, the replication jobs may also fail. You may receive an error message that resembles the following:

Replication-Replication Transaction-Log Reader Subsystem: agent  failed. Executed as user: DOMAIN\sqlagentaccount. (unknown security error). The step failed. Replication-Replication Snapshot Subsystem: agent  failed. Executed as user: DOMAIN\sqlagentaccount. (unknown security error). The step failed.

Replication-Replication Transaction Queue Reader Subsystem: agent  failed. Executed as user: DOMAIN\sqlagentaccount. (unknown security error). The step failed.

The SQL Server error log may contain an error message that resembles the following:

2006-09-29 09:48:43.12 spid54 Error: 14151, Severity: 18, State: 1.

2006-09-29 09:48:43.12 spid54 Replication-Replication Transaction-Log Reader Subsystem: agent  failed. Executed as user: DOMAIN\sqlagentaccount. (unknown security error). The step failed.

To resolve the problem, follow these steps:
 * 1) Set the SQL Server Agent service account in SQL Server Configuration Manager to the LocalSystem account.
 * 2) Stop and then start the SQL Server Agent service.
 * 3) Reset the SQL Server Agent service account in SQL Server Configuration Manager back to the original account.
 * 4) Stop and then start the SQL Server Agent service.

You may also be able to reset the password of the SQL Server Agent service account in SQL Server Configuration Manager.

Keywords: kbsql2005repl kbexpertiseadvanced kbbug KB911305

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.