Base right-sizing SQL Server on sampled CPU, memory pressure, buffer use and interval I/O, then compare peaks across a full business cycle.
Huge Transaction Log File in SQL Server: Find the Cause
A huge transaction log file has a named reason in log_reuse_wait_desc. This post builds a small demo database, reads that reason, backs up the log and finds the open transaction that holds it. It ends with a one time shrink and a safe growth step.
Decoding wait_resource: From a KEY or PAGE Lock to the Table
Decode wait_resource for blocked requests, map KEY and PAGE locks to objects, and keep undocumented row-hash checks on test copies.
How to Identify Process ID for SQL Server Services? – Interview Question of the Week #185
How do you find the Process ID for SQL Server services? One quick query on sys.dm_server_services returns the process id, status, last startup time and account.
How Much Work Each Processor (CPU) is Doing in SQL Server? – Interview Question of the Week #178
A client with 56 processors saw CPU always high and wanted to know how busy each one was. Here is a simple DMV query that shows work per Processor (CPU).
Optimal Value for Max Worker Threads in SQL Server
The optimal value for Max Worker Threads is the default, 0, which tells SQL Server to calculate the limit from the number of logical processors. This post shows how to read the real limit, how the formula works, and which wait and queue counters prove a thread shortage before you change anything.
Find Memory Used by Each Database in SQL Server
To see the memory used by each database, count its pages in the buffer pool with sys.dm_os_buffer_descriptors. This post builds a small demo database, shows buffer and dirty page sizes before and after a checkpoint, explains the row with no name, and covers what the buffer pool numbers leave out, such as the plan cache.







