3013 is never the cause, it is the last line of a failed restore. Five restore failures reproduced in a container, five different real errors above it, and three of them had nothing wrong with the backup file.
701 is the server unable to find memory at all. 8645 is the memory existing and being held by someone else. Neither one means buy more RAM, and cumulative wait stats will mislead you about both.
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Backup & Recovery What Msg 3154 Says Msg 3154 · Level 16 · State 4 The backup set holds a backup of a database other than the existing ‘Sales’ database. Msg 3013, Level 16, State 1 RESTORE DATABASE is terminating…
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Blocking & Locking Msg 5030 means another connection has the database open. Find that session before retrying the operation. What Msg 5030 Says Msg 5030 · Level 16 · State 2 The database YourDb could not be exclusively locked…
Msg 102 usually is not a typo. If the same statement runs on one database and fails on another, the parser grammar is chosen by compatibility level, not by the version of the instance.
sp_who2 has no WHERE clause. Capture its output into a thirteen column table with INSERT … EXEC and it becomes queryable, including a logging table you can run on a schedule. Plus the two errors that stop most people, and the DMV to use instead.
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Performance & Troubleshooting Msg 245 · Level 16 · State 1 Conversion failed when converting the varchar value ‘N/A’ to data type int. ⚡Quote the literal first. int outranks varchar, so an unquoted number makes SQL Server convert the…
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Performance & Troubleshooting Msg 547 · Level 16 · State 1 The DELETE statement conflicted with the REFERENCE constraint “FK_OrderLines_Orders”. The conflict occurred in database “Sales”, table “dbo.OrderLines”, column ‘OrderId’. ⚡Query sys.foreign_keys before you fix anything. SQL Server reports…
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.Related pillar: Performance & Troubleshooting What Msg 208 Says Msg 208 · Level 16 · State 1 Invalid object name ‘Orders’. ⚡Run SELECT DB_NAME(), SCHEMA_NAME() before anything else. Four contexts produce this error and three of them are about where you…
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. A SQL Server migration fails in two places: before it starts, when nobody checked whether the workload even fits the target, and after it finishes, when logins don’t match, users are orphaned, and the first Monday morning proves the move wasn’t as done…