SQL Server Performance

Mirror Monitoring question.......

Discussion in 'SQL Server 2005 Database Mirroring' started by sql_jr, Feb 11, 2009.

  1. sql_jr New Member

    Hello, forum:
    I'm looking for a way (command (sp) or script to monitor and/or provide status on DB mirroring,
    and to tell which dbs are being mirrored and if they're in sync - basically the DB monitor, but via tsql.
    First, I want to be able to find out if a db is mirrored (status in sys.databases?)
    For example, replication has sp_helpreplicationpublisher,etc...
  2. satya Moderator

    You could do with:
    USE msdb;EXEC sp_dbmmonitorresults <DBNAME>
    I suggest to look into BOL for more details on these SP_DBMM... stored procedures.
    Also if you happen to have the SQLPASS 2008 summit DVD checkout my talk on DB Mirroing usage & monitoring session.
  3. arunyadav Member

    You can also use the below mentioned
    Select * from sys.database_mirroring
    Select * from sys.database_mirroring_endpoints
    Select * from sys.database_mirroring_witnesses
    Select * from sys.dm_db_mirroring_connections

Share This Page