Is Stream Aggregate is Same as Gather Streams of Parallelism? – This was one of the brilliant questions I had received during my recent engagement.
SQL SERVER – Public Role Permissions and Effective Security Risk
Every database user belongs to Public and cannot be removed from that role. A reader asked whether the role should be eliminated.
How to Use a CASE Statement in the WHERE Clause? – Interview Question of the Week #239
Question: How to Use a CASE statement in the WHERE Clause? Answer: First of all – CASE is not a statement but rather an expression.
Read Heavy Workload or Write Heavy: Measure It in SQL Server
To tell a read heavy workload from a write heavy one, compare what the server reads with what it changes, and measure it over a window. This post counts reads and writes per table, reads the buffer and log counters with two snapshots, and explains what each lens misses.
Actual Execution Plan in SQL Server: Graphical, Text and XML
An actual execution plan shows how SQL Server really ran a query, with the true row counts beside the estimates. This post gets the plan three ways, as a graphical plan, as text with SET STATISTICS PROFILE and as XML, and uses a demo table to show how the estimate and the actual number can disagree.
Immutable Backups: Keeping a Copy Ransomware Cannot Delete
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.







