Use SQLCMD mode in SSMS for server and database variables, :CONNECT, :r include files, and an error-stop release script.
Running a Command in Every Database Without sp_MSforeachdb
Run a checked command in every database with a FAST_FORWARD cursor, AG role filter, QUOTENAME, and per-database error log.
Redundant Indexes: Index on Col1, Col2 vs Col1, Col2, Col3
Redundant indexes cost space and slow every write, but not every one can go. This post measures an index on Col1, Col2 next to an index on Col1, Col2, Col3 on SQL Server 2025: size, plan, reads and log bytes. It ends with a safe way to remove one.
SQL SERVER – Wrap SQL Code in SSMS – SQL in Sixty Seconds #038 – Video
Horizontal scrolling makes code hard to read. In this SQL in Sixty Seconds video I show how to wrap SQL code in SSMS without changing anyone’s formatting.
SQL SERVER – Creating Database with Different Collation on Server
A client ran two instances on every server just for case sensitivity. Here is how to create a database with a different collation on the same server instead.
Take a Database Backup in SSMS: Step by Step
To take a database backup in SSMS, right-click the database, choose Tasks, then Back Up, and pick the backup type. This post walks through the dialog, shows the T-SQL that does the same work, explains the log backup error people meet first, and checks the files afterwards.
MERGE Performance for Large Upserts: UPDATE Then INSERT Instead
Is MERGE really slow, or did the rewrite just run on a quiet night? Here is a fair test you can run yourself.







