Agent Jobs

Find Other Servers In Database Mirroring Configuration

Here’s some quick SQL logic to help you find the other Mirrord Server in the SQL Server Database Mirroring configuration.

use master;
set nocount on
select
'database' = DB_NAME(database_id)
, 'state' = mirroring_state_desc
, 'mirror role' = mirroring_role_desc
, 'partner server' = mirroring_partner_name
from
sys.database_mirroring
where
mirroring_guid is not null

Leave a comment