Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

sql server replication - how to find and drop subscriptions?

$
0
0

I had 2 subscriptions to a publication, but they were from the same subscriber server and writing to the same subscriber database, just one was bad and one was running fine.

enter image description here

enter image description here

I could not find a way to delete the bad one, so I decided to drop both, and then recreate the subscription.

on the publisher server

use [SupplierDB]
go
exec sp_dropsubscription @publication = N'SupplierDB', 
@subscriber = N'REPLON1', 
@destination_db = N'SupplierDB', 
@article = N'all'
GO

That dropped the good subscription.

enter image description here

Because I could not find a way to drop or even see the bad subscription I decided to drop the publication, but when I try it I get the following error message:

-- Dropping the transactional publication
use [SupplierDB]
exec sp_droppublication @publication = N'SupplierDB'
GO

Msg 14005, Level 16, State 1, Procedure sp_MSdrop_publication, Line 75 Cannot drop the publication because at least one subscription exists for this publication. Drop all subscriptions to the publication before attempting to drop the publication. If the problem persists, replication metadata might be incorrect; consult Books Online for troubleshooting information.

How can I find and drop this subscription?

This is a problem that I originally had on another question: NoSync subscriptions will need to be dropped and recreated


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>