Compare inline table-valued functions with scalar functions, preserve customer results, and inspect plans before claiming performance gains.
SQL SERVER – Restoring SQL Server 2017 to SQL Server 2005 Using Generate Scripts
I used generate scripts for a historical SQL Server 2017-to-2005 migration. It was a logical migration rather than a backward backup restore.
SQL SERVER – Simple Method to Find FIRST and LAST Day of Current Date
I calculate the FIRST and LAST Day of Current Date using explicit date boundaries. The historical sample starts on October 28, 2017.
SQL SERVER – Remove Duplicate Rows Using UNION Operator
The UNION operator removes duplicates from a query result without deleting source rows. I use a small example to show that distinction.
Log Reuse Wait Reason AVAILABILITY_REPLICA: What It Means and How to Fix It
A customer’s database always showed AVAILABILITY_REPLICA as the log reuse wait reason in sys.databases. Here is what it means and three causes to check: a slow network, a long running transaction and a resource constraint.
Where is the Default Settings for Backup Compression? – Interview Question of the Week #191
Where are the default settings for backup compression? The Back Up dialog shows three options. Here is where the server default lives and how to set it.







