sp_dropdistributiondb

Transact-SQL Reference

Transact-SQL Reference

sp_dropdistributiondb

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.

Syntax

sp_dropdistributiondb [ @database = ] 'database'

Arguments

[@database = ] 'database'

Is the database to drop. database is sysname, with no default.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_dropdistributiondb is used in all types of replication.

This stored procedure must be executed before dropping the Distributor by executing sp_dropdistributor.

Permissions

Only members of the sysadmin fixed server role can execute sp_dropdistributiondb.

See Also

sp_adddistributiondb

sp_changedistributiondb

sp_helpdistributiondb

System Stored Procedures