Deleting publications and subscriptions

Before you can delete either a publication or a subscription, you must first delete all the articles in the publication or subscription.

Before you can delete a publication, you must first delete all subscriptions that subscribe to that publication.

NoteYou must suspend the database connection before you delete a publication or subscription. See “Suspending and resuming database connections” for more information.

StepsTo delete a publication

  1. Use sp_droppub with the following syntax:

    sp_droppub pub_name
    

    where pub_name is the name of the publication.

StepsTo delete a subscription

  1. Use sp_dropsub with the following syntax:

    sp_dropsub sub_name
    

    where sub_name is the name of the subscription.