SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.

Canceled Query Plan: Three Ways to Capture It in SQL Server

A canceled query plan can be captured with Live Query Statistics, with a live plan query while the statement runs, or from Query Store after the cancel. This post runs a long query, reads its plan while it runs, cancels it and then reads the aborted run from Query Store. It also explains which plan each method returns.

Continue Reading

Disable Query Store on an Always On Database: What Blocks It

To disable Query Store on an Always On database, run ALTER DATABASE with QUERY_STORE = OFF, and try OFF (FORCED) when the statement waits. This post shows the states to read, the background commands that block the statement and the steps used on an Always On database. It marks which parts were tested on a single server and which come from a client case.

Continue Reading