We have a production DB which is in a mirror configuration. It is in synchronous high safety with automatic failover
configuration. Right now we monitor it using windows service which pings it. Is there a better way to monitor mirror state using job or script?
Sql-server – Propper way to monitor SQL Server mirror status from service or job
mirroringsql-server-2008
Related Question
- Sql-server – Manually moving SQL instance to another node causes immediate database mirror failover
- Sql-server – What precautions to take when moving a mirrored server
- Sql-server – Replace/upgrade mirrored server hardware
- Sql-server – MSSQL Mirror Configuration Troubleshooting: Witness server forcibly disconnecting every 100 seconds
- SQL Server 2008 – Best Approach to Mirror All Databases
- SQL Server Mirroring Failover – Rolled Back Transactions
- Sql-server – Mirroring issue with mirror server
- Sql-server – Temporarily disable SQL Server Mirroring
Best Answer
As stated in Monitoring Database Mirroring MSDN
You can monitor a mirrored database during a mirroring session to verify whether and how well data is flowing. To set up and manage monitoring for one or more of the mirrored databases on a server instance, you can use either Database Mirroring Monitor or the
sp_dbmmonitor
system stored procedures.Also, if you want you can use the sys.database_mirroring view. You can query this Catalog View and raise an email alert for each mirrored database that we find in an abnormal state using below script as explained here