SQL Flow Field Guide

sp_query_store_clear_message_queues

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

Clears all queued (non-persisted) Query Store messages pending for the replica against which the command is executed.

What changes

Input
Not stated in the Microsoft summary.
Output or change
Not stated in the Microsoft summary.

Syntax at a glance

sp_query_store_clear_message_queues
[ ; ]

Work example

Clears all queued (non-persisted) Query Store messages pending for the replica against which the command is executed.

Read the syntax and examples. Explain each argument and its effect before writing a call.

Check your work Which inputs are required, and what result or effect does the page document?

Open Microsoft Learn for full syntax, permissions, and details for your version.