Design immutable backups with enforced retention, separate storage access, offline recovery material, checksum checks, and restore tests.
Remove Extra tempdb Files in SQL Server Safely
To remove extra tempdb files, empty each file first with DBCC SHRINKFILE and then remove it with ALTER DATABASE. This post checks the file count and the allocation waits before you start, rehearses both steps on a demo database, shows the tempdb statements with their undo, and explains why emptying can fail.
How to Create a Table Automatically in All Newly Created Databases? – Interview Question of the Week #238
Question: How to Create a Table Automatically in All Newly Created Databases? This question was recently asked in my recent consulting engagement
DATETIMEFROMPARTS Function: Build Dates From Parts
The DATETIMEFROMPARTS function builds a datetime value from seven numbers, with no string conversion and no language trap. This post tests how it rounds milliseconds, which parts raise an error, how it treats NULL, and how its relatives build dates, times and offsets.
Runnable Sessions in SQL Server: What to Check Next
Runnable sessions are sessions that have everything they need except a free CPU. This post counts requests by status, checks that SQL Server can see every processor, reads the settings that cap CPU use, and lists the statements waiting in the queue, so a long queue next to a half idle CPU stops being a puzzle.
How to Skip Top N Rows in SQL Server? – Interview Question of the Week #237
Question: How to skip top N Rows in SQL Server and retrieve the rest of the rows? Answer: I had asked the above question in one of the interviews last week.







