SQL Server engine errors
Database Engine — 15 error codes
Reference list of 15 SQL Server engine errors with meanings, common causes, and related context.
About SQL Server engine errors
SQL Server engine errors are identified by a numeric error number paired with a severity level (0–25). The error number pinpoints the specific failure (such as 2627 for a primary key violation or 18456 for a login failure), while the severity level classifies the nature and urgency of the problem.
Severity levels follow a consistent pattern: 0–10 are informational messages, 11–16 are errors that the developer or user can correct (syntax errors, constraint violations, permission issues), 17–19 are resource or system-level errors that may require administrator attention (insufficient memory, database full, configuration limits), and 20–25 are fatal errors that typically terminate the connection and may indicate hardware or database corruption.
This collection documents 15 SQL Server engine errors, covering constraint violations (2601, 2627, 547), deadlocks (1205), login failures (18456), permission errors (229), syntax errors (102, 207), and database-level issues (4060, 9002, 3201). Each entry explains the error meaning, its severity classification, and the database operation that typically triggers it.
Showing 15 of 15 error codes
Deadlock — the transaction was deadlocked on resources with another process
Transaction Log Full — the database transaction log is full and no writes are possible
Cannot open backup device — SQL Server cannot access the specified backup file or path
Duplicate Key — an attempt to insert a duplicate value into a unique index
Constraint Violation — violation of a primary key or unique constraint
Conflicted Constraint — the statement conflicted with a foreign key or check constraint
Login Failed — the user login attempt failed
Invalid Object — the specified object name is invalid or does not exist
Cannot Open Database — the database requested by the login cannot be opened
Permission Denied — the current user lacks the required permission on the object
Cannot Insert NULL — a required column does not allow null values
String or Binary Data Truncated — the value exceeds the column's defined length
Update Conflict — the row was modified by another transaction after being read
Incorrect syntax near — a Transact-SQL syntax error was detected at the specified token
Invalid column name — referenced column does not exist in the table or result set
Frequently Asked Questions
Severity 0–10 are informational. Severity 11–16 are user-correctable errors (syntax, constraints, permissions). Severity 17–19 are resource or system errors requiring admin attention. Severity 20–25 are fatal errors that typically terminate the database connection.
Error 2601 indicates a duplicate key in a unique index — the index already contains the value being inserted. Error 2627 indicates a primary key or unique constraint violation — the constraint definition was violated. Both prevent the insert, but 2601 is index-specific while 2627 is constraint-specific.
Error 1205 means the transaction was selected as a deadlock victim and terminated to resolve a circular dependency between two transactions. SQL Server detects the deadlock and ends one transaction so the other can proceed.