Jim Sz shared a quick script to retrieve processes that use a specific database from sys.sysprocesses, with spid, status, host name and login.
SQL Server CLR: The Common Language Runtime Inside the Engine
SQL Server CLR means running .NET code, such as C# stored procedures, inside SQL Server. A diagram shows how the pieces fit, and why CLR helps with the cursors and loops that slow down T-SQL.
SQL SERVER – 2005 – Find Nth Highest Record from Database Table – Using Ranking Function ROW_NUMBER
Nicholas Paldino shared a neat way to find the Nth Highest Record from a table in SQL Server 2005 using the ranking function ROW_NUMBER. Here is his query.
SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL – Part 3
Part 3 on how to retrieve TOP and BOTTOM rows together: Dave Arthur’s solution uses UNION ALL instead of an OR clause, and it is quite good.
Top and Bottom Rows With a CTE in SQL Server: Part 2
Top and bottom rows with a CTE come from two ordered queries, one for each end of the table. This follow-up tests the reader’s single-CTE version and a two-CTE version on SQL Server 2025. It also compares a ROW_NUMBER version that read 336 pages against 4 for TOP, and shows what ties, empty tables and one-row tables return.
Finding the Most Frequently Run Queries
Most frequently run queries can consume large SQL Server resources even when each call is fast; use plan cache and Query Store to find them.







