Microsoft KB Archive/818552

= BUG: Replication Agent Might Run Continuously Even When the Replication Job is Completed =

Article ID: 818552

Article Last Modified on 5/16/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Service Pack 3

-



BUG #: 364057 (SQL Server 8.0)



SYMPTOMS
When you configure a replication job not to run continuously, and you then run the job, the job history displays that the job is complete. However, the replication job might still appear to run continuously, and the agent process for the replication agent might also run in the background continuously.

This problem also occurs when the replication job encounters an error.



CAUSE
You are using a proxy account for the SQL Server Agent, and you set the replication job owner to a user who does not have System Administrator credentials.



WORKAROUND
To work around the problem, use either of the following methods:
 * Do not use a proxy account for the SQL Server Agent.

-or-
 * If the SQL Server Agent must run under a proxy account, set the replication job owner to a user who does have System Administrator credentials.



MORE INFORMATION
In SQL Server 2000 Service Pack 3, when you run the replication agent by using a proxy account, a separate process is generated that is built in the Microsoft Windows subsystem. Therefore, the agent process runs in a separate window that requires user interaction (CTRL+C) to end the agent process. Because the agent process runs in the background, user interaction becomes impossible, and the agent process runs continuously. You can stop the agent process by using Task Manager.

Steps to Reproduce the Behavior
 Set the SQL Server Agent to use a proxy account. Set the replication job owner to a user who does have have System Administrator credentials. Set the replication job not to run continuously or incorporate an error in the replication job command line. To do so, follow these steps:  Right-click the replication job, and then click Properties. In the  Properties - <Server Name> dialog box, click the Steps tab.</li> Click Edit.</li> In the Edit Job Step - <Job name> dialog box, under the Command section,

remove the -Continuous flag from the command line.

-or-

Change the name of the publisher to the name of a publisher that does not exist.

Note Changing the publisher name is to simulate an error.</li> Click Apply, and then click OK.</li> To save the job settings, click Apply, and then click OK</li></ol> </li> Run the job.</li></ol>

Note Note that the job appears to run in the SQL Server Enterprise Manager, and that the job history shows that the job is either completed or failed. In Task Manager, you can see that the agent process continues to run.

<div class="references_section">