Query store is a valuable tool for people managing SQL Server, whether that’s on-prem, in an IaaS scenario or AWS RDS, Azure Managed Instance or Azure SQL DB. There are several possible ways to enable the Query Store.
This post will explore some of those methods. If you’re not familiar with Query Store, then go read this post. If you need help getting started with PowerShell, then start here, and that will help the later examples make a bit more sense.
Click through for examples using T-SQL and dbatools.