Skip to main content
Added another option
Source Link
Marian
  • 15.7k
  • 2
  • 61
  • 75

I had a mess with replication and solved it with this

DECLARE @subscriptionDB AS sysname
SET @subscriptionDB = N'DBName'

-- Remove replication objects from a subscription database (if necessary).
USE master
EXEC sp_removedbreplication @subscriptionDB
GO 

That and:

exec sp_cleanupdbreplication

Are the saviours when cleaning up messed up replications.

I had a mess with replication and solved it with this

DECLARE @subscriptionDB AS sysname
SET @subscriptionDB = N'DBName'

-- Remove replication objects from a subscription database (if necessary).
USE master
EXEC sp_removedbreplication @subscriptionDB
GO 

I had a mess with replication and solved it with this

DECLARE @subscriptionDB AS sysname
SET @subscriptionDB = N'DBName'

-- Remove replication objects from a subscription database (if necessary).
USE master
EXEC sp_removedbreplication @subscriptionDB
GO 

That and:

exec sp_cleanupdbreplication

Are the saviours when cleaning up messed up replications.

Source Link

I had a mess with replication and solved it with this

DECLARE @subscriptionDB AS sysname
SET @subscriptionDB = N'DBName'

-- Remove replication objects from a subscription database (if necessary).
USE master
EXEC sp_removedbreplication @subscriptionDB
GO