database mirroring queries
SELECT db.name, m.mirroring_role_desc,mirroring_state_desc,mirroring_safety_level,
mirroring_partner_name,mirroring_partner_instance,mirroring_witness_name,mirroring_witness_state_desc,*
FROM sys.database_mirroring m
JOIN sys.databases db
ON db.database_id = m.database_id
where db.name='DBNamehere'
SELECT
databases.name AS DatabaseName,
database_mirroring.mirroring_state_desc,
database_mirroring.mirroring_role_desc,
database_mirroring.mirroring_safety_level,
database_mirroring.mirroring_safety_level_desc,
database_mirroring.mirroring_safety_sequence,
database_mirroring.mirroring_witness_name,
database_mirroring.mirroring_witness_state,
database_mirroring.mirroring_witness_state_desc
FROM sys.database_mirroring
INNER JOIN sys.databases ON databases.database_id=database_mirroring.database_id
WHERE databases.database_id > 4
mirroring_partner_name,mirroring_partner_instance,mirroring_witness_name,mirroring_witness_state_desc,*
FROM sys.database_mirroring m
JOIN sys.databases db
ON db.database_id = m.database_id
where db.name='DBNamehere'
SELECT
databases.name AS DatabaseName,
database_mirroring.mirroring_state_desc,
database_mirroring.mirroring_role_desc,
database_mirroring.mirroring_safety_level,
database_mirroring.mirroring_safety_level_desc,
database_mirroring.mirroring_safety_sequence,
database_mirroring.mirroring_witness_name,
database_mirroring.mirroring_witness_state,
database_mirroring.mirroring_witness_state_desc
FROM sys.database_mirroring
INNER JOIN sys.databases ON databases.database_id=database_mirroring.database_id
WHERE databases.database_id > 4
Comments