DBMIRROR_WORKER_QUEUE Wait Type in SQL Server

⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: HADR_SYNC_COMMIT Wait TypeRelated pillar: High Availability

Is It a Problem?

No. Idle mirroring workers are the healthy state; it is commonly filtered as benign, and Get Wait Statistics filters it out by default.


What It Means

Microsoft’s definition is short: the database mirroring worker task is waiting for more work. When nothing is happening in the mirrored database, these waits can be long. The total reflects how many databases are mirrored and how quiet they are, nothing about mirroring health.


When It Does Matter

It does not. When mirroring is the question, look at the state of each mirrored database in sys.database_mirroring:

SELECT
    DB_NAME(database_id) AS database_name,
    mirroring_role_desc,
    mirroring_state_desc,
    mirroring_safety_level_desc,
    mirroring_partner_instance
FROM sys.database_mirroring
WHERE mirroring_guid IS NOT NULL;

The baseline to monitor is mirroring_state_desc staying SYNCHRONIZED for high-safety sessions, and the send queue described on DBMIRROR_SEND.


The DBMIRROR Family

These are the database mirroring waits. Mirroring is deprecated in favour of Availability Groups, and most of these are idle queues that tick over on any mirrored instance. The one that costs users time is DBMIRROR_SEND; for the Availability Group equivalent, see HADR_SYNC_COMMIT.

  • HADR_SYNC_COMMITThe AG equivalent. The primary waiting for a synchronous secondary, the wait mirroring migrations move to.The main page for this family
  • DBMIRROR_SENDNetwork backlog. Waiting for the network layer backlog to clear before sending mirroring messages.Worth a look when it climbs
  • DBMIRRORING_CMDLog flush. Waiting for log records to be flushed to disk; expected to be held for long periods.Usually noise
  • DBMIRROR_WORKER_QUEUEIdle workers. A mirroring worker task waiting for more work.Usually noise. This page.
  • DBMIRROR_EVENTS_QUEUEIdle events. Mirroring waiting for events to process.Usually noise
  • DBMIRROR_DBM_MUTEXMirror redo. Documented for information only; on the mirror, waiting for parallel redo threads.Usually noise

Where To Go Next

DBMIRROR_WORKER_QUEUE is background noise on a mirrored instance. If you are chasing a real problem, start with the waits that cost you time.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *