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... Thanks!
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.
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 -Arun