SQL Agent still attempting replication for deleted publication We recently retired a replication publication, deleting each subscription (push subscriptions) and then deleting the publication, all from within SSMS.  However, we continue to get the following message (once every minute) in the four days since deleting this publication.


  Replication-Replication Distribution Subsystem: agent (null) failed. The publication 'Replicate_ASG_Reference_Data' does not exist.


Why is it still trying to run a deleted publication, and how do I stop it?

Additional information: This is on SQL Server 2008 SP3 running on Windows Server 2008 R2.
It looks like you have some orphaned replication bits and/or orphaned replication agent jobs.

Note that Distribution.dbo.sp_MSremove_published_jobs will not remove your Distribution Agent jobs.  You will have to manually delete the orphaned job(s).

Locate the job(s) under SQL Server Agent -> Jobs.  The Distribution Agent job names will have the format Publisher-PublicationDatabase-Publication-Subscriber-integer.  Right-click the job -> Delete.

I hope this helps.