I've summarized this once. SQL Server deletes the distribution database, which describes how to delete the distribution database. Today, we introduce a special case of deleting distribution,
Before that, I didn't know how the replication on this server had been tossed around, and there was no content related to publishing or subscriptions in the local publications and local subscriptions of the SSMs admin interface.
However, using the command exec Sp_helpdistpublisher will see the properties of the Publisher using the Distributor
The following SQL parameter @publisher corresponds to the value of the above name, where xxxx is used instead
use master;
GO
exec ' xxxx '
We use the following SQL to find out that it has been published in the database (for the moment, a represents) a.
The following SQL is reported as an error, because there is a database-level trigger safety on this database, prohibit any DDL operation, after first disabling the trigger, the following SQL will be executed, the following part of the trigger will be cleaned up.
use master;
Go
EXEC ' A '
Then follow the SQL Server delete distribution database inside the steps, according to gourd painting scoop, execute the following SQL, you can easily remove the distribution database.
Use Artdb;
GO
exec ' xxx '
use master;
GO
exec sp_dropdistributiondb @Database = N' distribution '
GO
SQL Server Delete distribution database II