I have an interesting experience to share about the Query Ignoring CPU Threads. I was hired by a large eCommerce organization.
OS Threads by Scheduler in SQL Server: Count Them per CPU
OS threads by scheduler shows how many Windows threads each SQL Server scheduler owns. This post joins the scheduler, worker and thread views and counts them per CPU. It compares the counts with the server totals and explains the hidden schedulers that a careless query counts as CPUs.
Convert Empty String to NULL Date in SQL Server: Use NULLIF
To convert empty string to NULL in a date column, wrap the text in NULLIF before you cast it. A plain CAST returns 1900-01-01 and hides the problem. This post tests five expressions on six text values, including a real 1900 date, a run of spaces and a tab, and shows which ones stay correct.
Checking SQL Server Service Startup Type and Status From T-SQL
Inspect service startup type, current status, service account, and SQL TCP registry values, then compare configuration with live listeners.
SQL SERVER – List Service Broker Queue Count
I inspect Service Broker Queue Count through queue and internal-table catalogs. A customer requested a quick inventory.
SQL SERVER – Enabling or Disabling Triggers with the Correct Scope
To disable all triggers correctly, I first identify the required scope. My original customer case concerned expensive table-trigger work.
Simple Interest in SQL Server: A Function That Keeps Cents
Simple interest in SQL Server is principal times rate times years divided by 100, and a T-SQL function returns it in one line. This post shows how an int return type drops the cents and what SCHEMABINDING changes. It measures the cost of a scalar function on 500,000 rows and ends with compound interest.
SQL SERVER – Difference Between Count and Count_Big
The difference between Count and COUNT_BIG includes result range and indexed-view requirements. Their row-counting rules are the same.
Logon Storms: Protecting SQL Server From Connection Floods
Diagnose SQL Server logon storms, control connection growth, test a limited logon trigger, and preserve administrator recovery access.










