Category: Troubleshooting
-
msdb Is Growing: Purge Backup, Job and Mail History Safely
Which msdb history table is actually holding the space, why one far back cutoff makes sp_delete_backuphistory hang, and the date stepped purge that finishes.
Written by
-
SQL Agent Job Failed: Finding the Step That Actually Broke
The job outcome row never carries a cause. Read the step row in msdb.dbo.sysjobhistory first, then route the real message to the owner, proxy, permission, path or truncation behind it.
Written by
-
Login Failed or Permission Denied in SQL Server
A router for every SQL Server login and permission failure. Find your error number, read the real 18456 state from the ERRORLOG, and go straight to the page that owns the fix.
Written by
-
Cannot Bulk Load, Access Is Denied (Error 4861): It Is the Service Account, Not You
BULK INSERT fails with 4861 and Access is denied on a file you can open in Notepad. With a SQL Server login the file is opened by the service account, not by you. The reproduction, the operating system error codes that mean something else, and the double hop.
Written by
-
Execution Timeout Expired: Whose Timeout It Is, and What the Server Was Doing
Msg -2 comes from the client library, not from SQL Server. Here is how to tell the execution timeout from the connection timeout, find out whether the query was blocked when the client gave up, and why raising the timeout is not a fix.
Written by
-
Locked Out of SQL Server: Regain Sysadmin When Nobody Has It
Nobody has sysadmin, sa is disabled or its password is gone, and the instance is still running. The supported recovery is single-user mode, and it needs local admin on the box, not a SQL permission.
Written by
-
Restore From a Newer SQL Server Version (Error 3169)
The backup is from a newer version of SQL Server than the server restoring it, and no option changes that. What the two version numbers mean, why attach fails with 948, and the routes that work.
Written by
-
The Query Is Fast in SSMS but Slow From the Application
The same query returns instantly in SSMS and crawls from the application. SSMS connects with ARITHABORT ON and a .NET client connects with it OFF, so the plan cache holds two plans for one query. The query that proves it, and the fixes in order.
Written by
-
The Log in This Backup Set Is Too Recent or Too Early to Apply (Errors 4305, 4326 and 3159)
Restore chain errors 4305, 4326 and 3159: what the two LSNs in the message mean, which file to apply next, and how to back up the tail of the log before you overwrite anything.
Written by
-
Login Failed: Server Is in Script Upgrade Mode (Error 18401)
This is the error every patch window can raise and almost nobody plans for. The Cumulative Update installed, the service came back, and now every application login is refused with 18401. Nothing is broken yet. SQL Server is running the second half of the patch, and it will not let anyone in until that half…
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)