Advertisements
Home > Optimization Performance, SQL Server 2016 > Enable Query Store on a Database – SQL Server 2016

Enable Query Store on a Database – SQL Server 2016


… continuing from my [previous post] on Query Store.

Here we will see how can we enable it on a Database:

–> Right click on the Database you want to enable Query Store and select Properties. Now select the new feature Query Store at the bottom left side as shown below:

SQL Server 2016 Query Store 01

Set the Enable option to True, and click OK.
 

–> Alternative: You can also enable the Query Store by this simple ALTER DATABASE Statement:

USE [TestManDB]
GO

ALTER DATABASE [TestManDB] SET QUERY_STORE = ON
GO

–> After enabling the Query Store you can check the Database, expand it in Object Explorer, you will see a new folder with the same name “Query Store”, on expanding it you will see 4 reports, as shown in below snapshot:
SQL Server 2016 Query Store 02
 

–> You can check more about Query Store on MSDN BoL [here] with more coverage on what information/stats it captures and how you can Query them.


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: