How to delete a replicated table both in a publication and in a subscription

How to delete a replicated table in a publication as well as a subscription? (only for scripts)

I do not want to remove it only from replication, because in the signatures there will be an unreplicated copy of the table. I want all table instances to be deleted.

So, I want the script to delete the table from the publisher and delete the table from the publication, and also delete the table in the publisher and all subscribers. Ideally, this would require a table name parameter.

+3
source share
1 answer

You will need to call sp_droparticle or sp_dropmergearticle to remove the article from the publication, and then create a new snapshot.

DROP, , ().

.

DROP , sp_addscriptexec.

+4

All Articles