Following simple script can be used to check if there is any database in the current SQL instance is a part of the replication. This information can be pulled using SQL Server Management Studio, but if you have lots of databases it takes a long time to check manually.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
USE [master]; GO SELECT @@SERVERNAME as [Server Name], name as [Database name], state_desc as [Status], CASE WHEN is_published=1 OR is_merge_published =1 OR is_distributor=1 OR is_subscribed=1 THEN 'Yes' ELSE 'No' END AS [Is in replication ?] FROM sys.databases WHERE database_id > 4 ORDER By name |
Leave a Comment