Friday 18 August 2017

How to find the Principal Server from Mirror Server in Database Mirroring?


There are instances where you may need to find the principal server from the mirror server.

You can use the below query:

SELECT DISTINCT(mirroring_partner_instance)
FROM sys.database_mirroring
WHERE mirroring_partner_instance IS NOT NULL