An Availability Group Listener identifies a connection endpoint rather than a separate engine instance. I query where this connection actually arrived.
Find Queries Using an Index in the SQL Server Plan Cache
Find queries using an index by searching cached plans for its exact name. See the script, a surprise result, and what an unused index costs in SQL Server.
Query Hints on a View in SQL Server: Where OPTION Goes
Query hints on a view cannot sit inside the view. Learn where OPTION goes, what a view may contain, and how Query Store hints help.
SQL SERVER – Altering Column – From NULL to NOT NULL
Altering Column nullability to NOT NULL requires resolving existing NULLs under an approved data rule. A customer used empty strings.
Find Damaged Pages in SQL Server With suspect_pages
Find damaged pages in SQL Server by reading msdb.dbo.suspect_pages. Decode the event type, find the table behind each page and know what to do next.
Read Only Tables – Is it Possible? – SQL in Sixty Seconds #179
After reading it, lots of people asked me if I can make a video on this topic. Of course, here we go, Read Only Tables – Is it Possible?
Freeze a Table With a Read Only Filegroup in SQL Server
Freeze a table by placing it on a READ_ONLY filegroup. See what fails, how to move a table in, and how to undo it in SQL Server.
SQL SERVER – Making Filegroup Read Only
A filegroup read-only setting prevents writes to objects stored there. A customer asked whether a table could be protected this way.
Counting Objects by Type in Every Database With One Query
One loop and one pivot give you tables, views, procedures and functions for every database. A planted demo database proves the counts.
SQL SERVER – Find Business Days Between Dates
Business Days Between Dates require a defined calendar and endpoint rule. This example counts inclusive Monday-to-Friday dates for July 2021.










