Category: Troubleshooting
-
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
-
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
-
Attach a SQL Server Database Without a Log File
FOR ATTACH_REBUILD_LOG brings a cleanly shut down database back from the .mdf alone, with a 504 KB log, SIMPLE recovery and a broken backup chain. Msg 1813 when the shutdown was not clean.
Written by
-
Could Not Find Stored Procedure (Error 2812)
Could not find stored procedure: the wrong database, the missing schema, and the name SQL Server actually looked for, with a query that finds it anywhere.
Written by
-
Cannot Connect to WMI Provider: SQL Server Configuration Manager Will Not Open
Configuration Manager will not open: Cannot connect to WMI provider, Invalid namespace. Why it happens, the mofcomp fix with the right file for your version, and how to check it worked.
Written by
-
Query Was Fast Yesterday, Slow Today: Find What Changed
Query fast yesterday, slow today, and nothing deployed? Rule out blocking, prove the plan changed with Query Store, find what threw it away and force the old plan back, with real lab output.
Written by
-
The Current Transaction Cannot Be Committed (Error 3930)
Msg 3930 is never the real error. An earlier error doomed the transaction and a CATCH block tried to write anyway. How to find the swallowed error with XACT_STATE() and Extended Events, and the CATCH pattern that fixes it, captured on a lab database.
Written by
-
Sort and Hash Spills to TempDB: Find the Query and Fix the Grant
Read the spill warning in the actual plan, find why the memory grant was too small, and find the queries that memory grant feedback on SQL Server 2022 and 2025 does not fix.
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)