A common question I hear when discussing forcing of plans in query store is, “Why did a plan I previously forced quit using the forced plan?”. In most cases this is related to having a database in an Always On Availability Group. If the database IDs in the availability group differs across the servers, plan forcing information will not get maintained after a failover. When I saw this happen at a customer, after getting the database ID’s to align forced plans persisted after fail overs.
![](https://6c9e5a.a2cdn1.secureserver.net/wp-content/uploads/2017/09/blog_header2.png)