Error codes
17,238
Database Engine error numbers
sql server / error codes
Look up SQL Server Database Engine error numbers, messages, severity, event logging, and Microsoft source links.
Search by code or message text. Use severity and event logging to decide where to check next.
Error codes
17,238
Database Engine error numbers
Event logged
1,430
Marked by SQL Server for event logging
Microsoft pages
344
Errors with a dedicated source page
Updated
May 7, 2026
73,354 source rows parsed
Search
Search by number, severity, category, or message text.
How to use this lookup
Search for the SQL Server error number first. Message text can vary slightly between versions and applications.
Severity shows how SQL Server classified the message. Higher severity usually needs faster review, especially 20 and above.
Open the Microsoft source for the matching error or range when you need the official message text.
Common error codes
Common SQL Server errors found in application logs, SQL Agent jobs, deployment output, backups, and the SQL Server error log.
Incorrect syntax near '%.*ls'.
Severity 15
Syntax or query shape
Invalid column name '%.*ls'.
Severity 16
Syntax or query shape
Invalid object name '%.*ls'.
Severity 16
Syntax or query shape
The %ls permission was denied on the object '%.*ls', database '%.*ls', schema '%.*ls'.
Severity 14
Security or permissions
Conversion failed when converting the %ls value '%.*ls' to data type %ls.
Severity 16
Version or change risk
Violation of %ls constraint '%.*ls'. Cannot insert duplicate key in object '%.*ls'. The duplicate key value is %ls.
Severity 14
Security or permissions
Transaction (Process ID %d) was deadlocked on %.*ls resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Severity 13
Deadlock
Login failed for user '%.*ls'.%.*ls%.*ls
Severity 14
Security or permissions
The operating system returned error %ls to SQL Server during a %S_MSG at offset %#016I64x in file '%ls'. Additional messages in the SQL Server error log and operating system error log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Severity 24
Corruption or engine risk
SQL Server detected a logical consistency-based I/O error: %ls. It occurred during a %S_MSG of page %S_PGID in database ID %d at offset %#016I64x in file '%ls'. Additional messages in the SQL Server error log or operating system error log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see [https://go.microsoft.com/fwlink/?linkid=2252374](https://go.microsoft.com/fwlink/?linkid=2252374).
Severity 24
Corruption or engine risk
A read of the file '%ls' at offset %#016I64x succeeded after failing %d time(s) with error: %ls. Additional messages in the SQL Server error log and operating system error log may provide more detail. This error condition threatens database integrity and must be corrected. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Severity 10
Corruption or engine risk
The transaction log for database '%ls' is full due to '%ls' and the holdup lsn is %S_LSN.
Severity 17
Resource pressure
Categories
Use these categories to narrow the lookup when you know the type of problem, such as login failures, syntax errors, backup failures, resource pressure, or corruption warnings.
7,332 errors
General engine errors cover messages that do not fit a narrower bucket. Use the exact error number, message text, severity, and timestamp to continue the lookup.
Examples #165 #184 #187 #192
2,321 errors
Syntax and query-shape errors usually come from invalid T-SQL, object names, columns, variables, identifiers, procedures, functions, or generated SQL.
Examples #102 #207 #208 #101
1,696 errors
Security and permission errors include login failures, denied access, credential problems, certificates, principals, users, and permission checks.
Examples #229 #2627 #18456 #218
1,349 errors
Availability-related SQL Server errors usually mention replicas, failover, endpoints, mirroring, clustering, listeners, or Always On state.
Examples #341 #369 #548 #666
1,202 errors
Resource-pressure errors point toward disk, log space, tempdb, memory, worker threads, quotas, limits, or full database files.
Examples #9002 #103 #105 #106
1,040 errors
Performance and concurrency errors often involve locks, blocking, query execution, statistics, workers, waits, or plan-related behavior.
Examples #159 #172 #288 #304
874 errors
Version and change-risk errors usually appear when a feature, compatibility level, edition, deprecated behavior, or SQL Server version does not match the workload.
Examples #245 #125 #206 #210
749 errors
Corruption or engine-risk errors include high-severity I/O, checksum, consistency, DBCC, and storage-related messages that should be handled carefully.
Examples #823 #824 #825 #21
664 errors
Backup and restore errors usually need the full job output, backup chain, file path, media, database state, and restore target checked together.
Examples #667 #805 #908 #922
11 errors
Deadlock errors mean SQL Server picked a victim because two or more sessions blocked each other in a lock cycle. The deadlock graph is the useful evidence.
Examples #1205 #1231 #3635 #5231
Number ranges
Microsoft groups Database Engine errors by number range. Use these source pages when you know the error number and need the official range.