none
Identifing Primary Server for Mirrored Database RRS feed

  • Question

  • HI All,

    Kindly let me know how to identify Primary Database Server from a Mirrored Database in SQL Server.

    Regards,

    Varun

    Thursday, August 28, 2014 5:55 AM

Answers

  • Right click on Mirrored Database > Tasks > Launch Database Mirroring Monitor

    • Marked as answer by Raje14 Thursday, August 28, 2014 6:35 AM
    Thursday, August 28, 2014 6:09 AM

All replies

  • Right click on Mirrored Database > Tasks > Launch Database Mirroring Monitor

    • Marked as answer by Raje14 Thursday, August 28, 2014 6:35 AM
    Thursday, August 28, 2014 6:09 AM
  • Thankss.. Imran..   Any Views other than this option?
    Thursday, August 28, 2014 6:36 AM
  • Thankss.. Imran..   Any Views other than this option?

    select * from sys.database_mirroring
    select * from sys.database_mirroring_endpoints
    select * from sys.database_mirroring_witnesses
    Thursday, August 28, 2014 7:10 AM
  • Use this below Query which will give you with Mirror

    SELECT 
    DB_NAME(database_id) As DatabaseName,  
    CASE WHEN mirroring_guid IS NOT NULL THEN 'Mirroring is On' ELSE 'No mirror configured' END AS IsMirrorOn,  
    mirroring_state_desc,  
    CASE WHEN mirroring_safety_level=1 THEN 'High Performance' WHEN mirroring_safety_level=2 THEN 'High Safety' ELSE NULL END AS MirrorSafety,  
    mirroring_role_desc,  
    mirroring_partner_instance AS MirrorServer  
    FROM sys.database_mirroring  
    GO 
    

    status



    Nag Pal MCTS/MCITP (SQL Server 2005/2008) :: Please Mark Answer/vote if it is helpful ::

    Thursday, August 28, 2014 7:41 AM