Skip to content

Latest commit

 

History

History
72 lines (59 loc) · 2.97 KB

File metadata and controls

72 lines (59 loc) · 2.97 KB

title: "sp_query_store_flush_db (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/24/2017" ms.prod: "sql" ms.prod_service: "database-engine, sql-database" ms.service: "" ms.component: "system-stored-procedures" ms.reviewer: "" ms.suite: "sql" ms.technology:

  • "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords:
  • "sp_query_store_flush_db_TSQL"
  • "sys.sp_query_store_flush_db_TSQL"
  • "sp_query_store_flush_db"
  • "sys.sp_query_store_flush_db" dev_langs:
  • "TSQL" helpviewer_keywords:
  • "sys.sp_query_store_flush_db"
  • "sp_query_store_flush_db" ms.assetid: 580c03ae-57fc-4562-a6bb-5ec89521e38c caps.latest.revision: 7 author: "edmacauley" ms.author: "edmaca" manager: "craigg" ms.workload: "Inactive" monikerRange: "= azuresqldb-current || >= sql-server-2016 || = sqlallproducts-allversions"

sp_query_store_flush_db (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2016-asdb-xxxx-xxx-md]

Flushes the in-memory portion of the Query Store data to disk.

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_query_store_flush_db [;]  

Return Code Values

0 (success) or 1 (failure)

Remarks

Permissions

Requires the EXECUTE permission on the database, and DELETE permission on the query store catalog views.

Examples

The following example flushes the in-memory portion of the Query Store data to disk.

EXEC sp_query_store_flush_db;  

See Also

sp_query_store_force_plan (Transact-SQL)
sp_query_store_remove_query (Transact-SQL)
sp_query_store_unforce_plan (Transact-SQL)
sp_query_store_reset_exec_stats (Transact-SQL)
sp_query_store_remove_plan (Transct-SQL)
sp_query_store_reset_exec_stats (Transact-SQL)
Query Store Catalog Views (Transact-SQL)
Monitoring Performance By Using the Query Store