Events
Sep 15, 6 AM - Sep 17, 3 PM
The best SQL community-led learning event. Sept 2025. Save €200 with code FABLEARN.
Get registeredThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server 2022 (16.x)
Clears all queued (non-persisted) Query Store messages pending for the replica against which the command is executed. sp_query_store_clear_message_queues
is used when Query Store for readable secondaries has been enabled.
Transact-SQL syntax conventions
sp_query_store_clear_message_queues
[ ; ]
None.
0
(success) or 1
(failure).
Requires the ALTER permission on the database.
The following example clears all queued (non-persisted) Query Store messages pending. The action applies to the replica against which the command is executed.
EXECUTE sp_query_store_clear_message_queues;
Events
Sep 15, 6 AM - Sep 17, 3 PM
The best SQL community-led learning event. Sept 2025. Save €200 with code FABLEARN.
Get registeredAsk Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in