INF: Replication Tasks: Disabling Logreader and Distribution 'Autostart' Tasks (227835)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q227835

SUMMARY

By default SQL Server schedules the Logreader and Distribution tasks with an 'Autostart' frequency. SQL 6.5 Tasks can be enabled or disabled from the Task Scheduling Window. Tasks can also be modified using sp_addtask and sp_updatetask.

MORE INFORMATION

If a task scheduled for 'Autostart' is disabled, it appears to stop running for SQL 6.5. When the 'Running Tasks' window is refreshed the disabled 'Autostart' task does not appear. However, the disabled 'Autostart' task is still running. Running tasks can be verified with the following command:
SELECT * FROM sysprocesses
				
If an 'Autostart' Task is re-enabled without stopping the original task, one of two situations can occur:
  • Logreader fails with the following error in the task history window:
    Another Logreader is replicating the database. Unable to execute sp_repldone on 'Server Name'.
  • A second instance of the Distribution Task will be generated. This can be verified with the same query on sysprocesses. This situation can cause duplicate records in the subscribing database if no Unique or Primary Key exists on the replicated table(s).
These errors are avoided for SQL 6.5 by stopping the SQL Executive Service prior to modifying an 'Autostart' task. Then, start SQL Executive after the modification is complete.

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbinfo KB227835