1

I have created log shipping and the primary server is also used for transactional replication. Now after creating log shipping I have noticed the publisher shows up on the secondary and it wont let me delete the database on the secondary as it is being used for replication. How do I delete the database from the secondary?

2
  • Do you need replication ? – Kin Shah Sep 24 '18 at 16:54
  • Replication is being used for reporting....Log SHipping used for DR...The primary is 2 Node Cluster... – SQL_NoExpert Sep 24 '18 at 16:55
0

When you've restored the database on the secondary you actually moved all its properties, including the fact it's a publisher. In this case you don't have a working replication, just the attributes for replication enabled. So this won't let you drop the db as you want.

The simplest way to remove replication metadata for this db is by using the system stored procs:

-- ON THE PUBLISHER
use YourDb
Go

exec sp_cleanupdbreplication
exec sp_removedbreplication
GO

Just make sure you're running this script on the secondary, the one you want to drop, not on the production db.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.