A quick script using sys.dm_db_partition_stats that lists the row count of every table and shows the largest table in database right at the top.
How to Ask a SQL Question That Actually Gets Answered
Want a fast answer? Here’s how to ask a SQL question with a small script, the exact error and the expected result, so helpers can answer.
SQL SERVER – Top Five Articles of Year 2008
My Top 5 Articles of year 2008 from SQLAuthority.com and pinaldave.com, led by the most visited page: the SQL Server 2008 interview questions and answers list.
Always Encrypted in Plain Words
Explain Always Encrypted in plain words, including client-held keys, deterministic and randomized encryption, query limits, and operations.
SQL SERVER – sqlcmd – Using a Dedicated Administrator Connection to Kill Currently Running Query
When a long running query makes SQL Server stop responding, sqlcmd with a Dedicated Administrator Connection lets you connect from another computer and kill it.
Granting VIEW SERVER STATE Without Handing Out sysadmin
Grant VIEW SERVER STATE or SQL Server 2022 performance permissions to a monitoring login, add job history access, and test its limits.
SQL SERVER – Find Currently Running Query – T-SQL
A short script to find a currently running query on your server using sys.dm_exec_requests, plus the KILL command to stop one that runs for too long.
SQL SERVER – Interesting Observation – Using sqlcmd From SSMS Query Editor
Turn on SQLCMD Mode and the SSMS Query Editor can run sqlcmd scripts that mix OS and SQL commands. The interesting part: the OS commands run first.
SQL SERVER – sqlcmd vs osql – Basic Comparison
sqlcmd vs osql: which one should you use to run queries from the command prompt? A short comparison of isql, osql and sqlcmd, and why I pick sqlcmd.
SQL SERVER – 2008 – Change Color of Status Bar of SSMS Query Editor
Change the color of status bar in SSMS 2008 for each server, so a query meant for development never runs on production by mistake. Step by step with images.










