{"name":"Data not yet sent to mirror 'InsertDatabaseNameHere'","description":"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.","tsql":"DECLARE\t@MonitorResults AS TABLE (\r\n\tdatabase_name VARCHAR(255),\r\n\trole INT,\r\n\tmirror_state TINYINT,\r\n\twitness_status TINYINT,\r\n\tlog_generat_rate INT,\r\n\tunsent_log INT,\r\n\tsent_rate INT,\r\n\tunrestored_log INT,\r\n\trecovery_rate INT,\r\n\ttransaction_delay INT,\r\n\ttransaction_per_sec INT,\r\n\taverage_delay INT,\r\n\ttime_recorded DATETIME,\r\n\ttime_behind DATETIME,\r\n\tlocal_time DATETIME);\r\n \r\nINSERT\tINTO @MonitorResults\r\n\t\tEXEC sp_dbmmonitorresults \r\n\t\t\t@database_name = 'InsertDatabaseNameHere',\r\n\t\t\t@mode = 0,\r\n\t\t\t@update_table = 0;\r\n \r\nSELECT\tunsent_log\r\nFROM\t@MonitorResults;","instances":true,"frequency":60,"databases":{"mode":1},"rateofchange":false,"metricenabled":true,"name_comment":"Note: Replace 'InsertDatabaseNameHere' with the name of the mirror.","noalertremark":"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.","tsql_comment":"Note: Replace 'InsertDatabaseNameHere' with the name of the mirror.","aboveorbelow":"above","_thresholds_high":{"selected":false},"_thresholds_medium":{"selected":false},"_thresholds_low":{"selected":false},"collections":1,"alertenabled":true,"targetentitytype":0}