Author: Peter Whyte
-
Tune a Slow Query With Copilot in SSMS
A slow query scanning 200,000 rows to return 18. Copilot in SSMS read the plan itself, found the implicit conversion and the non-sargable YEAR(), and gave a rewrite and an index. What worked, and what to check yourself.
Written by
-
xp_readerrorlog: Read the SQL Server Error Log with T-SQL
Copy-paste xp_readerrorlog examples that work, a parameter cheat sheet, why generated versions fail, and how to read the log without sysadmin.
Written by
-
Cannot Drop Database Because It Is Currently in Use (Error 3702)
Cannot drop database because it is currently in use: who is connected, why your own window counts, and the drop that clears them safely.
Written by
-
Could Not Drop Login Because the User Is Currently Logged In (Error 15434)
Msg 15434 means the login still has a session open. Disabling it does not end that session: find it, KILL it, and reassign the databases and jobs it owns before the drop.
Written by
-
Set a Maximum Database File Size in SQL Server (MAXSIZE)
Find existing MAXSIZE caps, set one in T-SQL or SSMS, and what SQL Server 2025 does at the cap: 1105 for a data file, 9002 for a log, 5040 if you cap below the current size.
Written by
-
SQL Server Activity Monitor in SSMS (and the Performance Dashboard)
Activity Monitor gives you a live look at a SQL Server instance from SSMS with no RDP session. What it shows, what it needs, and when a script does the job better.
Written by
-
SQL Server Implicit Conversion: How CONVERT_IMPLICIT Turns a Seek Into a Scan
The same lookup typed as varchar seeks 1 row; typed as nvarchar it scans 100,000. How to spot CONVERT_IMPLICIT in a plan and how to avoid it.
Written by
-
CTEs: Recursive and Non-Recursive, With Real Query Differences
A non-recursive CTE is a named subquery with the same plan. A recursive CTE walks a hierarchy, and Msg 530 means it hit MAXRECURSION, usually a cycle in the data.
Written by
-
Grant VIEW DATABASE PERFORMANCE STATE in SQL Server
VIEW DATABASE PERFORMANCE STATE is database scoped: check a login across every database, grant it, and know which DMVs still need the server permission.
Written by
-
Move a Table to Another Schema in SQL Server
ALTER SCHEMA TRANSFER moves a table in one statement and drops every permission on it. What to script first, what blocks it (Msg 15348, 15151), and how to rename a schema.
Written by
- Tune a Slow Query With Copilot in SSMS
- xp_readerrorlog: Read the SQL Server Error Log with T-SQL
- Cannot Drop Database Because It Is Currently in Use (Error 3702)
- Could Not Drop Login Because the User Is Currently Logged In (Error 15434)
- Set a Maximum Database File Size in SQL Server (MAXSIZE)
- SQL Server Activity Monitor in SSMS (and the Performance Dashboard)
- Backups & Recovery (18)
- DBA Scripts (154)
- High Availability (HA) (13)
- Installation & Configuration (60)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (10)
- Performance Tuning (38)
- Security (Encryption & Permissions) (25)
- Storage & Capacity (18)
- T-SQL Fundamentals (17)
- Troubleshooting (108)
- Wait Types (236)