Tuesday, June 9, 2009
Mirroring session consist in the relationships between partner servers and witness. To understand how database mirror session work and states of databases is possible to inspect data from catalog views (sys.database_mirroring for principal or mirror, sys.database_mirroring_witnesses for witness).
The following query return the description of mirror session about principal or mirror databases:
DB_NAME(database_id) AS 'DatabaseName'
WHERE mirroring_guid IS NOT NULL;
The following query return the description of mirror session about witness instance: