One of the most popular conversations during Comprehensive Database Performance Health Check is about CPU and memory issues.
DBCC CHECKIDENT: Check and Fix the Next Identity Value
DBCC CHECKIDENT reports the next identity value of a table and can change it. This post runs NORESEED, the no-option form and RESEED on a small demo table. It shows how DELETE and TRUNCATE treat the counter, the duplicate key error from a value that is too low, and who may run the command.
Get CPU Details – SQL in Sixty Seconds #164
I understand that there is no one way to describe the CPUs and that is the primary reason, why I get a different answer when I try to get CPU details.
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.
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.







