Author: Peter Whyte
-
RESTORE Is Terminating Abnormally (Errors 3013 and 3241)
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.
Written by
-
Insufficient System Memory and Memory Grant Timeouts (Errors 701 and 8645)
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.
Written by
-
The Backup Set Holds a Backup of a Database Other Than the Existing Database (Error 3154)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Backup & Recovery 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 abnormally. ⚡Restore alongside rather…
Written by
-
The Database Could Not Be Exclusively Locked to Perform the Operation (Error 5030)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Blocking & Locking Msg 5030 · Level 16 · State 2 The database YourDb could not be exclusively locked to perform the operation. ⚡Never end a session with the database still in SINGLE_USER. An application pool takes the one available…
Written by
-
Incorrect Syntax Near in SQL Server (Error 102)
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.
Written by
-
Log and Filter sp_who2 Results in SQL Server
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.
Written by
-
Conversion Failed When Converting the varchar Value to Data Type int (Error 245)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: 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 whole…
Written by
-
The DELETE Statement Conflicted With a FOREIGN KEY Constraint (Error 547)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: 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 one…
Written by
-
Invalid Object Name in SQL Server (Error 208)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Performance & Troubleshooting 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 are sitting, not whether the…
Written by
-
DBA Scripts: Migration and Deployment
🔧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…
Written by
- DBA Scripts: Get Log Shipping Status
- SQL Server Row-Level Security: The Filter Does Not Stop Cross-Tenant Writes
- View the Definition of a Stored Procedure in SQL Server
- TempDB Is Full or Still Growing: Find What Is Using It, Right Now
- SQL Server Service Will Not Start: Error 17113, 17058, 1067 and Where the Real Reason Is
- How to Move TempDB Files in SQL Server
- Backups & Recovery (17)
- DBA Scripts (152)
- High Availability (HA) (13)
- Installation & Configuration (49)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (20)
- Storage & Capacity (16)
- T-SQL Fundamentals (15)
- Troubleshooting (94)
- Wait Types (235)