Good DBAs automate the boring work. Here is a simple script to run Backup and Restore of a database from the command prompt with SQLCMD.
Warning Before SQL Login Passwords Expire With DaysUntilExpiration
A Friday-night login failure is avoidable. One small query warns you weeks ahead, if somebody owns the warning.
Generating Random Numbers Per Row: RAND, NEWID and CRYPT_GEN_RANDOM
Generate random numbers per row with NEWID or CRYPT_GEN_RANDOM, compare seeded RAND, inspect bucket spread, and pick a row without a sort.
SQL SERVER – Difference Between NOLOCK and NOWAIT Hints
Should you use NOLOCK when NOWAIT errors out on a lock? Here is the difference between NOLOCK and NOWAIT, and why neither guarantees a valid answer.
SQL SERVER – Significance of Table Input Parameter to Stored Procedure
Pass a whole table into a stored procedure instead of forming and parsing XML. Here is why a table input parameter to stored procedure saves round trips.
JSON_ARRAYAGG and JSON_OBJECTAGG: Building JSON From Rows in SQL Server 2025
Build customer arrays with JSON_ARRAYAGG and settings objects with JSON_OBJECTAGG in SQL Server 2025, with explicit order and null rules.
SQL Server Instance or Database: What Is the Difference?
A SQL Server instance is the engine and a database is one set of data inside it. What each level owns, why a login and a user are different objects, and which line to draw when you separate customers or teams.







