When we need to delete/restore a SQL database. We must have to check first if the replication is setup or not on that database. If replication is set and you are trying to delete/restore a database then it may cause an issue.
It’s a good practice to check first if the replication is setup or not and if yes then you need to ask IT to stop replication before deleting/restoring a DB.
This is an easiest way to check if replication is enabled in a SQL Server. It will not return any status info but just will let you know if it’s enabled for a DB.
When a user database is configured as a Publisher or a Subscriber, replication adds system tables to the database.
select name, is_published, is_subscribed, is_merge_published, is_distributor
where is_published = 1 or is_subscribed = 1 or
is_merge_published = 1 or is_distributor = 1