This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a script for checking the whether SQL Server database is configured for Mirroring.
If you are managing multiple databases on your server, this script will help you for identifying mirror configured database.
You can easily get this information from sys.database_mirroring. Check the below script.
1 2 3 4 5 6 7 8 9 |
SELECT d.name as DatabaseName ,CASE WHEN dm.mirroring_state is NULL THEN 'Mirroring is not configured' ELSE 'Mirroring is configured' END as MirroringStatus FROM sys.databases d INNER JOIN sys.database_mirroring dm ON d.database_id=dm.database_id |