In the case that replication doesn’t clean up properly, the publisher database can’t be altered. If trying to remove the publication from the publisher, it will have errors: “Can not connect to distributor. ‘distributor_admin’ is not configured as a remote login..” In this situation, publisher is not able to connect to distributor any more. We can set the @ignore_distributor parameter value to 1 in store procedure sp_dropsubscription and sp_droppublication to force remove the publications.