RESTORE_MSDA_THREAD_BARRIER Wait Type in SQL Server

⏳Part of the SQL Server Wait Types Library, every wait type explained.Related deep dive: BACKUPIO and BACKUPBUFFER Wait TypesRelated pillar: Backup & Recovery

Is It a Problem?

Routinely, no; it is the coordination cost of restoring from several backup files at once, and its total follows restore duration. It was zero on our SQL Server 2025 lab. Get Wait Statistics does not filter it out, so if it ranks, you will see it. The sharp edge is on older versions, below.


What It Means

Microsoft does not list it in sys.dm_os_wait_stats. It is a thread in a restore from multiple backup devices waiting at a barrier: the threads restoring parts of one block from different streams must all finish before they move to the next block.


When It Does Matter

Before SQL Server 2019, an error on one thread, such as a failed read from a backup file or a failed write to a database file, could leave the other threads hung at this barrier, so the restore never finishes and has to be killed; SQL Server 2019 catches this and fails the restore properly. A striped restore stuck well past its normal duration on an older version fits that:

SELECT
    r.session_id,
    r.command,
    r.percent_complete,
    r.wait_type,
    r.total_elapsed_time / 60000 AS elapsed_min
FROM sys.dm_exec_requests AS r
WHERE r.command LIKE N'RESTORE%';

Look for a read or write error in the error log around when percent_complete stopped moving, then kill and retry, and investigate the failing file. On any version, stripes on devices of equal speed keep this wait small, because the slowest device sets the pace. The baseline to monitor is your restore duration for each database. The query needs VIEW SERVER STATE.


The BACKUP Family

These are the backup and restore waits: threads in the backup pipeline waiting on each other, on buffers and on the backup device. The main page is BACKUPIO and BACKUPBUFFER, which covers where backup time goes.

  • BACKUPIO / BACKUPBUFFERDevice and buffers. Waiting on the backup device and for free backup buffers.The main page for this family
  • BACKUPBackup processing. A task blocked as part of backup processing.Worth a look when it climbs
  • BACKUPTHREADWaiting for a backup task. Waiting for another backup task to finish; minutes to hours is normal.Usually noise
  • DUMP_LOG_COORDINATORSubtask data. A main task waiting for a subtask to generate data; long waits are unexpected.Usually noise
  • PARALLEL_BACKUP_QUEUERestore output. Serialising output from RESTORE HEADERONLY, FILELISTONLY or LABELONLY.Usually noise
  • RESTORE_MSDA_THREAD_BARRIERMulti-device restore. Restore threads reading several backup devices waiting for each other.Worth a look when it climbs. This page.
  • VDI_CLIENT_OTHERVDI work. Documented as internal use only; reported during AG seeding and Azure database copies.Usually noise

Where To Go Next

RESTORE_MSDA_THREAD_BARRIER follows striped restores. 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 *