August 28, 2018
How to enable Query store in sql server
Query store is a new powerful feature introduced in SQL 2016 which stores the query plan, statistics and query execution for current and past
queries.
You can enable it from SSMS ( 2016 and above) by clicking on the database and then on properties tab on the left side you can find
query store. In the operation mode select ‘Read Write’ and click on ‘OK’. This will enable the Query Store.
To turn query store off on SSMS change the operation mode to ‘OFF’
Query store can be enabled by using below sql query.
ALTER DATABASE AdventureWorks2012 SET QUERY_STORE = ON;
For turning the query store off using query use the below sql query.
ALTER DATABASE AdventureWorks2012 SET QUERY_STORE = OFF;
Note : Query store cannot be enabled on master or tempdb database.
Watch this Video on how to enable Query store in sql server.
6,482 total views, 2 views today