Metrics install automatically if you have SQL Monitor installed.
If you are using Redgate’s SQL Server monitoring tool, SQL Monitor, you can instantly install and run this metric on your servers.
This metric is described in Grant Fritchey’s Custom Metrics for monitoring mirroring article on Simple Talk.
Use this metric to track the amount of data waiting to be sent from the principal database to the mirror. This is also known as the send queue. For more details, see Database Mirroring Sessions (MSDN article).
Important setup information
Before you can start using this metric, you need to:
- Run the following Microsoft procedure on the msdb database you’ll use in the custom metric:
[/sql]This sets up a SQL Agent job that periodically updates information about the mirrored databases on your server. For more information, see http://msdn.microsoft.com/en-us/library/ms403582.aspx.
- Make sure the SQL Agent is configured and running on the server. Then you can retrieve information using the sp_dbmmonitorresults procedure.
Data not yet sent to mirror 'InsertDatabaseNameHere'
This metric measures the amount of data (in KBs) waiting to be sent from the principal database to the mirror. This is also known as the send queue.
The T-SQL query that will collect data
Instances to collect from
Databases to collect from
Use collected or calculated values
Leave the Use a calculated rate of change between collections check box unchecked
If you wanted to add an alert, track the metric values over time to determine sensible high, medium and low thresholds in your mirroring environment.