Friday, March 7, 2025

How to check if replication is configured in a SQL Managed Instance

 Today, I had to verify if a SQL Managed Instance had replication turned on to investigate a login that showed up in a Defender vulnerability report.

Here's the query, hope it helps someone.


SELECT    name, 
          is_published, 
          is_subscribed, 
          is_merge_published, 
          is_distributor
FROM sys.databases
WHERE    is_published = 1 
         or is_subscribed = 1 
         or is_merge_published = 1 
         or is_distributor = 1

No comments:

Post a Comment

Little script to see the backup history

 Today, I was teaching a co-worker how to create a copy only backup of a SQL Managed Instance database.  And I came up to use this script t...