Drops a distribution database. Drops the physical files used by the database if they are not used by another database. This stored procedure is executed at the Distributor on any database.
sp_dropdistributiondb [ @database = ] 'database'
[@database = ] 'database'
Is the database to drop. database is sysname, with no default.
0 (success) or 1 (failure)
sp_dropdistributiondb is used in all types of replication.
This stored procedure must be executed before dropping the Distributor by executing sp_dropdistributor.
Only members of the sysadmin fixed server role can execute sp_dropdistributiondb.