SQL Server Database Engine
Could not drop the Distributor '%s'. This Distributor has associated distribution databases.
A SQL Server instance that is configured as a Distributor cannot be removed from the role of Distributor because there are distribution databases associated with the instance. This error occurs if you attempt to drop a distribution database that is associated with one or more Publishers.
To find the names of any Publishers and distribution databases associated with this Distributor, execute sp_helpdistpublisher (Transact-SQL) from any database on the Distributor.
Execute sp_dropdistributiondb (Transact-SQL) for any distribution databases associated with this Distributor. After all distribution database associations are removed, you can disable distribution.