Question about mirroring.

  • Hello Everyone,

    I was just wondering, if a person happens to log onto a SQL server and finds that one of the databases is being mirrored, is there a way of finding out where the principle database is located?

    Regards,

    D.

  • SELECT d.name, d.database_id, m.mirroring_role_desc,

    m.mirroring_state_desc, m.mirroring_safety_level_desc,

    m.mirroring_partner_name, m.mirroring_partner_instance,

    m.mirroring_witness_name, m.mirroring_witness_state_desc

    FROM sys.database_mirroring m JOIN sys.databases d

    ON m.database_id = d.database_id

    WHERE mirroring_state_desc IS NOT NULL

    ---------------------------------------------------------------------

  • Marrrrvelous!

    Thank you very much!

    Regards,

    D.

  • Database mirroring endpoints also shows important information about mirroring

    select * from sys.database_mirroring_endpoints

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply