If you want to completely remove replication, including all the "bits". Or your server has only one publication, and this is the one you are trying to delete.
I would recommend:
- Connect to the publisher or distributor that you want to disable in Microsoft SQL Server Management Studio, and then expand the node server.
- Right-click the Replication folder and select Disable Publishing and Distribution.
- Follow the instructions of the Disable Publishing and Distribution Wizard and select generate scripts instead of processing .
This has the advantage of not only completely cleaning things up. But also deleting the distribution database, which, if you have ever dealt with previously, is known to be dotted with replication residues from the past.
Full documentation can be found here .
source share