Skip to content

SQL Server Error Mapping

This page lists how native SQL Server database or driver errors are represented as TsSqlErrorReason values. The table uses the same row catalog and row order as the other native database pages, so a - means this semantic case is not currently mapped for SQL Server.

Database error shows the values exposed through databaseErrorCode and databaseErrorNumber when both are available. Connector-only signals include the connector inline. SQL_UNKNOWN is intentionally the last row.

SQL Server engine errors are number-first. Microsoft documents Database Engine failures by error number or message_id, with related attributes such as severity, state, procedure, line, and message text. When those engine errors come through mssql, they are commonly exposed as a RequestError with code equal to EREQUEST; the same error object carries the native SQL Server number in number. For rows such as EREQUEST / 2627, EREQUEST tells you the error came through the driver request wrapper, and 2627 is the SQL Server-specific discriminator used by the mapper. Driver-only signals such as ETIMEOUT, ELOGIN, or EARGS are listed by their textual code because they are not SQL Server engine numbers.

Exact mapper-known codes are listed individually. Broad class, range, or message-pattern fallbacks are kept when the mapper intentionally handles an open-ended family of errors; if the same native code appears in more than one row, the driver message determines the final mapped reason.

Category Reason Database error Filled fields
Constraints SQL_CONSTRAINT_VIOLATED
constraintType
unique
EREQUEST / 1505: unique constraint violation
EREQUEST / 2601: unique constraint violation
EREQUEST / 2627: unique constraint violation
constraintType
constraintName when inferred
tableName when inferred
columnName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Constraints SQL_CONSTRAINT_VIOLATED
constraintType
not null
EREQUEST / 233: not null constraint violation
EREQUEST / 515: not null constraint violation
constraintType
constraintName when inferred
tableName when inferred
columnName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Constraints SQL_CONSTRAINT_VIOLATED
constraintType
foreign key
EREQUEST / 547: foreign key constraint violation when the message names a FOREIGN KEY constraint constraintType
constraintName when inferred
tableName when inferred
columnName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Constraints SQL_CONSTRAINT_VIOLATED
constraintType
check
EREQUEST / 547: check constraint violation when the message names a CHECK constraint
EREQUEST / 548: check constraint violation
constraintType
constraintName when inferred
tableName when inferred
columnName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Constraints SQL_CONSTRAINT_VIOLATED
constraintType
exclusion
- -
Constraints SQL_CONSTRAINT_VIOLATED
constraintType
restrict
- -
Constraints SQL_CONSTRAINT_VIOLATED EREQUEST / 547: constraint violation when the message does not identify FOREIGN KEY or CHECK databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
too long
EREQUEST / 8152: too long
EREQUEST / 2628: too long
EREQUEST / 8028: too long
EREQUEST / 8046: too long
EREQUEST / 9461: too long
EREQUEST / 6907: too long
EREQUEST / 6915: too long
EREQUEST / 6935: too long
EREQUEST / 13613: too long
EREQUEST / 13615: too long
EREQUEST / 13625: too long
EREQUEST / 13639: too long
EREQUEST / 13644: too long
EREQUEST / 13646: too long
EREQUEST / 13648: too long
EREQUEST / 13650: too long
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
out of range
EREQUEST / 220: out of range
EREQUEST / 232: out of range
EREQUEST / 236: out of range
EREQUEST / 242: out of range
EREQUEST / 244: out of range
EREQUEST / 248: out of range
EREQUEST / 294: out of range
EREQUEST / 296: out of range
EREQUEST / 298: out of range
EREQUEST / 517: out of range
EREQUEST / 535: out of range
EREQUEST / 542: out of range
EREQUEST / 8115: out of range
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
invalid value
EREQUEST / 210: invalid value
EREQUEST / 245: invalid value
EREQUEST / 295: invalid value
EREQUEST / 8114: invalid value
EREQUEST / 8169: invalid value
EREQUEST / 8023: invalid value
EREQUEST / 8043: invalid value
EREQUEST / 13612: invalid value
EREQUEST / 13622: invalid value
EREQUEST / 13659: invalid value
EREQUEST / 13670: invalid value
EREQUEST / 13671: invalid value
EREQUEST / 13692: invalid value
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
invalid format
EREQUEST / 235: invalid format
EREQUEST / 241: invalid format
EREQUEST / 293: invalid format
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
invalid encoding
EREQUEST / 13640: invalid encoding
EREQUEST / 13684: invalid encoding
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
invalid json
EREQUEST / 13606: invalid json
EREQUEST / 13607: invalid json
EREQUEST / 13609: invalid json
EREQUEST / 13645: invalid json
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
invalid xml
EREQUEST / 9400: invalid xml
EREQUEST / 9401: invalid xml
EREQUEST / 9402: invalid xml
EREQUEST / 9403: invalid xml
EREQUEST / 9404: invalid xml
EREQUEST / 9405: invalid xml
EREQUEST / 9406: invalid xml
EREQUEST / 9407: invalid xml
EREQUEST / 9408: invalid xml
EREQUEST / 9409: invalid xml
EREQUEST / 9410: invalid xml
EREQUEST / 9411: invalid xml
EREQUEST / 9412: invalid xml
EREQUEST / 9413: invalid xml
EREQUEST / 9414: invalid xml
EREQUEST / 9415: invalid xml
EREQUEST / 9416: invalid xml
EREQUEST / 9417: invalid xml
EREQUEST / 9418: invalid xml
EREQUEST / 9419: invalid xml
EREQUEST / 9420: invalid xml
EREQUEST / 9421: invalid xml
EREQUEST / 9422: invalid xml
EREQUEST / 9423: invalid xml
EREQUEST / 9424: invalid xml
EREQUEST / 9425: invalid xml
EREQUEST / 9426: invalid xml
EREQUEST / 9427: invalid xml
EREQUEST / 9428: invalid xml
EREQUEST / 9429: invalid xml
EREQUEST / 9430: invalid xml
EREQUEST / 9431: invalid xml
EREQUEST / 9432: invalid xml
EREQUEST / 9433: invalid xml
EREQUEST / 9434: invalid xml
EREQUEST / 9435: invalid xml
EREQUEST / 9436: invalid xml
EREQUEST / 9437: invalid xml
EREQUEST / 9438: invalid xml
EREQUEST / 9439: invalid xml
EREQUEST / 9440: invalid xml
EREQUEST / 9441: invalid xml
EREQUEST / 9442: invalid xml
EREQUEST / 9443: invalid xml
EREQUEST / 9444: invalid xml
EREQUEST / 9445: invalid xml
EREQUEST / 9446: invalid xml
EREQUEST / 9447: invalid xml
EREQUEST / 9448: invalid xml
EREQUEST / 9449: invalid xml
EREQUEST / 9450: invalid xml
EREQUEST / 9451: invalid xml
EREQUEST / 9452: invalid xml
EREQUEST / 9453: invalid xml
EREQUEST / 9454: invalid xml
EREQUEST / 9455: invalid xml
EREQUEST / 9456: invalid xml
EREQUEST / 9457: invalid xml
EREQUEST / 9458: invalid xml
EREQUEST / 9459: invalid xml
EREQUEST / 9460: invalid xml
EREQUEST / 9462: invalid xml
EREQUEST / 9463: invalid xml
EREQUEST / 9464: invalid xml
EREQUEST / 9465: invalid xml
EREQUEST / 9466: invalid xml
EREQUEST / 9467: invalid xml
EREQUEST / 6911: invalid xml
EREQUEST / 6912: invalid xml
EREQUEST / 6913: invalid xml
EREQUEST / 6914: invalid xml
EREQUEST / 6916: invalid xml
EREQUEST / 6917: invalid xml
EREQUEST / 6918: invalid xml
EREQUEST / 6919: invalid xml
EREQUEST / 6921: invalid xml
EREQUEST / 6922: invalid xml
EREQUEST / 6923: invalid xml
EREQUEST / 6924: invalid xml
EREQUEST / 6929: invalid xml
EREQUEST / 6930: invalid xml
EREQUEST / 6931: invalid xml
EREQUEST / 6936: invalid xml
EREQUEST / 6937: invalid xml
EREQUEST / 6938: invalid xml
EREQUEST / 6939: invalid xml
EREQUEST / 9480: invalid xml
EREQUEST / 6901: invalid xml
EREQUEST / 6904: invalid xml
EREQUEST / 6905: invalid xml
EREQUEST / 6906: invalid xml
EREQUEST / 6909: invalid xml
EREQUEST / 6926: invalid xml
EREQUEST / 6927: invalid xml
EREQUEST / 6933: invalid xml
EREQUEST / 6934: invalid xml
EREQUEST / 6947: invalid xml
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
invalid regular expression
EREQUEST / 572: invalid regular expression errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
null not allowed
EREQUEST / 8022: null not allowed
EREQUEST / 8042: null not allowed
EREQUEST / 13638: null not allowed
errorType
tableName when inferred
columnName when inferred
typeName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Values SQL_INVALID_VALUE
errorType
sequence limit
- -
Parameters SQL_INVALID_PARAMETER
parameterErrorType
missing
EARGS (mssql): missing parameter
EPARAM (mssql): missing parameter
EREQUEST / 137: missing parameter
EREQUEST / 201: missing parameter
EREQUEST / 216: missing parameter
EREQUEST / 313: missing parameter
EREQUEST / 8178: missing parameter
parameterErrorType
parameterName when inferred
parameterIndex when inferred
expectedParameterCount when inferred
actualParameterCount when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Parameters SQL_INVALID_PARAMETER
parameterErrorType
too many
EREQUEST / 180: too many parameter
EREQUEST / 6206: too many parameter
EREQUEST / 8003: too many parameter
EREQUEST / 8144: too many parameter
EREQUEST / 8146: too many parameter
parameterErrorType
parameterName when inferred
parameterIndex when inferred
expectedParameterCount when inferred
actualParameterCount when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Parameters SQL_INVALID_PARAMETER
parameterErrorType
wrong count
EREQUEST / 8008: wrong count parameter parameterErrorType
parameterName when inferred
parameterIndex when inferred
expectedParameterCount when inferred
actualParameterCount when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Parameters SQL_INVALID_PARAMETER
parameterErrorType
invalid name
EINJECT (mssql): invalid name parameter
EREQUEST / 349: invalid name parameter
EREQUEST / 8005: invalid name parameter
parameterErrorType
parameterName when inferred
parameterIndex when inferred
expectedParameterCount when inferred
actualParameterCount when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Parameters SQL_INVALID_PARAMETER
parameterErrorType
invalid index
- -
Parameters SQL_INVALID_PARAMETER
parameterErrorType
invalid type
- -
Parameters SQL_INVALID_PARAMETER
parameterErrorType
invalid value
EREQUEST / 214: invalid value parameter
EREQUEST / 225: invalid value parameter
parameterErrorType
parameterName when inferred
parameterIndex when inferred
expectedParameterCount when inferred
actualParameterCount when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Parameters SQL_INVALID_PARAMETER
parameterErrorType
invalid binding
- -
Parameters SQL_INVALID_PARAMETER
parameterErrorType
not bindable
- -
Parameters SQL_INVALID_PARAMETER
parameterErrorType
already bound
EDUPEPARAM (mssql): already bound parameter parameterErrorType
parameterName when inferred
parameterIndex when inferred
expectedParameterCount when inferred
actualParameterCount when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Parameters SQL_INVALID_PARAMETER EARGS (mssql): invalid parameter
EPARAM (mssql): invalid parameter
EINJECT (mssql): invalid parameter
EDUPEPARAM (mssql): invalid parameter
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object not found SQL_OBJECT_NOT_FOUND
objectType
database
EREQUEST / 911: database not found
EREQUEST / 998: database not found
EREQUEST / 40145: database not found
objectType
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object not found SQL_OBJECT_NOT_FOUND
objectType
schema
- -
Object not found SQL_OBJECT_NOT_FOUND
objectType
table or view
EREQUEST / 208: table or view not found objectType
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object not found SQL_OBJECT_NOT_FOUND
objectType
column
EREQUEST / 207: column not found
EREQUEST / 1911: column not found
objectType
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object not found SQL_OBJECT_NOT_FOUND
objectType
routine
EREQUEST / 261: routine not found
EREQUEST / 2812: routine not found
objectType
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object not found SQL_OBJECT_NOT_FOUND
objectType
sequence
- -
Object not found SQL_OBJECT_NOT_FOUND
objectType
collation
- -
Object not found SQL_OBJECT_NOT_FOUND
objectType
index
EREQUEST / 307: index not found
EREQUEST / 308: index not found
EREQUEST / 40307: index not found
objectType
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object not found SQL_OBJECT_NOT_FOUND
objectType
trigger
- -
Object not found SQL_OBJECT_NOT_FOUND
objectType
cursor
- -
Object not found SQL_OBJECT_NOT_FOUND
objectType
prepared statement
- -
Object not found SQL_OBJECT_NOT_FOUND
objectType
role
- -
Object not found SQL_OBJECT_NOT_FOUND - -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
database
EREQUEST / 1801: database already exists objectType
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
schema
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
table or view
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
column
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
routine
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
sequence
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
index
EREQUEST / 1913: index already exists objectType
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
trigger
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
cursor
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS
objectType
prepared statement
- -
Object already exists SQL_OBJECT_ALREADY_EXISTS EREQUEST / 2714: object already exists databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object state SQL_OBJECT_STATE_ERROR
objectStateErrorType
invalid state
EREQUEST / 315: invalid state
EREQUEST / 316: invalid state
EREQUEST / 40558: invalid state
EALREADYPREPARED (mssql): invalid state
ENOTPREPARED (mssql): invalid state
objectStateErrorType
objectType when inferred
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object state SQL_OBJECT_STATE_ERROR
objectStateErrorType
wrong object type
- -
Object state SQL_OBJECT_STATE_ERROR
objectStateErrorType
object in use
EREQUEST / 3101: object in use
EREQUEST / 3102: object in use
EREQUEST / 3702: object in use
objectStateErrorType
objectType when inferred
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Object state SQL_OBJECT_STATE_ERROR
objectStateErrorType
dependent objects still exist
EREQUEST / 3726: dependent objects still exist
EREQUEST / 3729: dependent objects still exist
EREQUEST / 3732: dependent objects still exist
objectStateErrorType
objectType when inferred
schemaName when inferred
tableName when inferred
columnName when inferred
objectName when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_SYNTAX_ERROR EREQUEST / 1731: syntax error
EREQUEST / 1732: syntax error
EREQUEST / 1733: syntax error
EREQUEST / 1734: syntax error
EREQUEST / 102: syntax error
EREQUEST / 105: syntax error
EREQUEST / 156: syntax error
EREQUEST / 319: syntax error
EREQUEST / 1018: syntax error
EREQUEST / 1034: syntax error
EREQUEST / 1035: syntax error
EREQUEST / 1736: syntax error
EREQUEST / 1740: syntax error
EREQUEST / 1741: syntax error
EREQUEST / 3019: syntax error
EREQUEST / 3220: syntax error
EREQUEST / 3225: syntax error
EREQUEST / 3749: syntax error
EREQUEST / 3766: syntax error
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_AMBIGUOUS_IDENTIFIER
identifierErrorType
ambiguous
- -
Statement SQL_AMBIGUOUS_IDENTIFIER
identifierErrorType
duplicate
- -
Statement SQL_AMBIGUOUS_IDENTIFIER EREQUEST / 209: ambiguous identifier
EREQUEST / 326: ambiguous identifier
EREQUEST / 327: ambiguous identifier
identifier when inferred
identifierType when inferred
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
incomplete statement
- -
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid definition
EREQUEST / 142: invalid definition
EREQUEST / 423: invalid definition
EREQUEST / 424: invalid definition
EREQUEST / 432: invalid definition
EREQUEST / 435: invalid definition
EREQUEST / 1038: invalid definition
EREQUEST / 4502: invalid definition
EREQUEST / 4505: invalid definition
EREQUEST / 4506: invalid definition
EREQUEST / 12307: invalid definition
EREQUEST / 41321: invalid definition
EREQUEST / 41327: invalid definition
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
type mismatch
EREQUEST / 206: type mismatch
EREQUEST / 249: type mismatch
EREQUEST / 257: type mismatch
EREQUEST / 402: type mismatch
EREQUEST / 403: type mismatch
EREQUEST / 450: type mismatch
EREQUEST / 529: type mismatch
EREQUEST / 8116: type mismatch
EREQUEST / 8117: type mismatch
EREQUEST / 13636: type mismatch
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid statement context
EREQUEST / 101: invalid statement context
EREQUEST / 112: invalid statement context
EREQUEST / 154: invalid statement context
EREQUEST / 226: invalid statement context
EREQUEST / 259: invalid statement context
EREQUEST / 287: invalid statement context
EREQUEST / 321: invalid statement context
EREQUEST / 323: invalid statement context
EREQUEST / 413: invalid statement context
EREQUEST / 414: invalid statement context
EREQUEST / 544: invalid statement context
EREQUEST / 545: invalid statement context
EREQUEST / 1058: invalid statement context
EREQUEST / 4005: invalid statement context
EREQUEST / 4006: invalid statement context
EREQUEST / 4007: invalid statement context
EREQUEST / 4508: invalid statement context
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid identifier
EREQUEST / 203: invalid identifier
EREQUEST / 243: invalid identifier
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid reference
EREQUEST / 107: invalid reference
EREQUEST / 4104: invalid reference
EREQUEST / 4121: invalid reference
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid grouping
EREQUEST / 144: invalid grouping
EREQUEST / 164: invalid grouping
EREQUEST / 278: invalid grouping
EREQUEST / 329: invalid grouping
EREQUEST / 8124: invalid grouping
EREQUEST / 8127: invalid grouping
EREQUEST / 8120: invalid grouping
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid windowing
EREQUEST / 4108: invalid windowing
EREQUEST / 4109: invalid windowing
EREQUEST / 4112: invalid windowing
EREQUEST / 4113: invalid windowing
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid recursion
EREQUEST / 460: invalid recursion
EREQUEST / 461: invalid recursion
EREQUEST / 462: invalid recursion
EREQUEST / 463: invalid recursion
EREQUEST / 464: invalid recursion
EREQUEST / 465: invalid recursion
EREQUEST / 466: invalid recursion
EREQUEST / 467: invalid recursion
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid locator
- -
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
case not found
- -
Statement SQL_INVALID_SQL_STATEMENT
statementErrorType
invalid argument
EREQUEST / 536: invalid argument
EREQUEST / 537: invalid argument
EREQUEST / 577: invalid argument
EREQUEST / 1023: invalid argument
EREQUEST / 1228: invalid argument
EREQUEST / 4114: invalid argument
EREQUEST / 4116: invalid argument
EREQUEST / 9820: invalid argument
EREQUEST / 9828: invalid argument
EREQUEST / 9987: invalid argument
EREQUEST / 41303: invalid argument
EREQUEST / 41394: invalid argument
EREQUEST / 42304: invalid argument
EREQUEST / 42305: invalid argument
EREQUEST / 43201: invalid argument
EREQUEST / 43202: invalid argument
EREQUEST / 45020: invalid argument
EREQUEST / 45021: invalid argument
statementErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Statement SQL_INVALID_SQL_STATEMENT fallback SQL Server statement errors databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Execution SQL_DIVISION_BY_ZERO EREQUEST / 8134: division by zero databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Execution SQL_CARDINALITY_VIOLATION EREQUEST / 109: cardinality violation
EREQUEST / 110: cardinality violation
EREQUEST / 116: cardinality violation
EREQUEST / 120: cardinality violation
EREQUEST / 121: cardinality violation
EREQUEST / 205: cardinality violation
EREQUEST / 213: cardinality violation
EREQUEST / 512: cardinality violation
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Execution SQL_ROUTINE_ERROR EREQUEST / 217: routine error databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Transactions TRANSACTION_ERROR
transactionErrorType
invalid state
EINVALIDSTATE (mssql): invalid state
TransactionError: invalid state
transactionErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Transactions TRANSACTION_ERROR
transactionErrorType
aborted
EREQUEST / 3930: aborted
EREQUEST / 40540: aborted
EREQUEST / 41300: aborted
EREQUEST / 41301: aborted
EREQUEST / 41339: aborted
EABORT (mssql): aborted
transactionErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Transactions TRANSACTION_ERROR
transactionErrorType
active transaction
EALREADYBEGUN (mssql): active transaction transactionErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Transactions TRANSACTION_ERROR
transactionErrorType
serialization failure
EREQUEST / 3960: serialization failure
EREQUEST / 41302: serialization failure
EREQUEST / 41305: serialization failure
EREQUEST / 41325: serialization failure
transactionErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Transactions TRANSACTION_ERROR
transactionErrorType
deadlock
EREQUEST / 1205: deadlock transactionErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Transactions TRANSACTION_ERROR
transactionErrorType
transaction rolled back
EREQUEST / 1206: transaction rolled back transactionErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Transactions TRANSACTION_ERROR
transactionErrorType
outcome unknown
- -
Transactions TRANSACTION_ERROR
transactionErrorType
invalid savepoint
- -
Transactions TRANSACTION_ERROR
transactionErrorType
unsupported operation
- -
Transactions NOT_IN_TRANSACTION EREQUEST / 3902: not in transaction
EREQUEST / 3903: not in transaction
ENOTBEGUN (mssql): not in transaction
driver-mapped cases fill databaseErrorCode, databaseErrorNumber when available, and databaseErrorMessage; direct checks fill no extra fields
Transactions NESTED_TRANSACTION_NOT_SUPPORTED EALREADYBEGUN (mssql): nested transaction not supported driver-mapped cases fill databaseErrorCode, databaseErrorNumber when available, and databaseErrorMessage; direct checks fill no extra fields
Transactions FORBIDDEN_CONCURRENT_USAGE EREQINPROG (mssql): concurrent query runner usage
EINVALIDSTATE (mssql): concurrent query runner usage
driver-mapped cases fill databaseErrorCode, databaseErrorNumber when available, and databaseErrorMessage; direct checks fill no extra fields
Transactions TRANSACTION_LEVEL_NOT_SUPPORTED mssql invalid isolation level message: transaction level not supported transactionLevel when available
databaseErrorCode
databaseErrorMessage
Transactions TRANSACTION_ACCESS_MODE_NOT_SUPPORTED raised directly by query runners that reject the transaction access mode accessMode
Timeouts SQL_TIMEOUT
timeoutType
connection
ETIMEOUT (mssql): connection timeout
ConnectionError: connection timeout
timeoutType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Timeouts SQL_TIMEOUT
timeoutType
lock
EREQUEST / 1222: lock timeout timeoutType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Timeouts SQL_TIMEOUT
timeoutType
statement
ETIMEOUT (mssql): statement timeout
RequestError: statement timeout
timeoutType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Timeouts SQL_TIMEOUT
timeoutType
transaction
EREQUEST / 40549: transaction timeout
ETIMEOUT (mssql): transaction timeout
TransactionError: transaction timeout
timeoutType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Timeouts SQL_TIMEOUT
timeoutType
idle transaction
- -
Timeouts SQL_TIMEOUT
timeoutType
cancelled
ECANCEL (mssql): cancelled timeout timeoutType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Timeouts SQL_TIMEOUT
timeoutType
database file busy
- -
Connections SQL_CONNECTION_ERROR
errorType
connection lost
EREQUEST / 4014: connection lost
EREQUEST / 7836: connection lost
ECLOSE (mssql): connection lost
ESOCKET (mssql): connection lost
errorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Connections SQL_CONNECTION_ERROR
errorType
temporarily unavailable
EREQUEST / 40501: temporarily unavailable
EREQUEST / 40613: temporarily unavailable
EREQUEST / 40624: temporarily unavailable
EREQUEST / 40635: temporarily unavailable
EREQUEST / 40642: temporarily unavailable
EREQUEST / 40669: temporarily unavailable
EREQUEST / 40671: temporarily unavailable
EREQUEST / 40675: temporarily unavailable
EREQUEST / 976: temporarily unavailable
EREQUEST / 982: temporarily unavailable
errorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Connections SQL_CONNECTION_ERROR
errorType
invalid connection configuration
EREQUEST / 40531: invalid connection configuration
EREQUEST / 978: invalid connection configuration
EREQUEST / 979: invalid connection configuration
EREQUEST / 45031: invalid connection configuration
EINSTLOOKUP (mssql): invalid connection configuration
EDRIVER (mssql): invalid connection configuration
EENCRYPT (mssql): invalid connection configuration
errorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Connections SQL_CONNECTION_ERROR
errorType
pool error
ENOTOPEN (mssql): pool error
ECONNCLOSED (mssql): pool error
errorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Resources SQL_RESOURCE_LIMIT_REACHED
resourceType
memory
EREQUEST / 701: memory resource limit
EREQUEST / 802: memory resource limit
EREQUEST / 40553: memory resource limit
EREQUEST / 1437: memory resource limit
EREQUEST / 1471: memory resource limit
EREQUEST / 6532: memory resource limit
EREQUEST / 6533: memory resource limit
EREQUEST / 8356: memory resource limit
EREQUEST / 8359: memory resource limit
EREQUEST / 8651: memory resource limit
EREQUEST / 8657: memory resource limit
EREQUEST / 9824: memory resource limit
EREQUEST / 9827: memory resource limit
EREQUEST / 41331: memory resource limit
EREQUEST / 41379: memory resource limit
resourceType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Resources SQL_RESOURCE_LIMIT_REACHED
resourceType
disk
EREQUEST / 1101: disk resource limit
EREQUEST / 1105: disk resource limit
EREQUEST / 9002: disk resource limit
EREQUEST / 40552: disk resource limit
EREQUEST / 3911: disk resource limit
resourceType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Resources SQL_RESOURCE_LIMIT_REACHED
resourceType
temp space
EREQUEST / 40551: temp space resource limit
EREQUEST / 1138: temp space resource limit
resourceType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Resources SQL_RESOURCE_LIMIT_REACHED
resourceType
connections
- -
Resources SQL_RESOURCE_LIMIT_REACHED
resourceType
pool
TimeoutError (tarn): pool resource limit resourceType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Resources SQL_RESOURCE_LIMIT_REACHED
resourceType
cpu
EREQUEST / 10961: cpu resource limit resourceType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Resources SQL_RESOURCE_LIMIT_REACHED
resourceType
file size
EREQUEST / 40544: file size resource limit resourceType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Resources SQL_RESOURCE_LIMIT_REACHED EREQUEST / 13641: resource limit reached
EREQUEST / 10928: resource limit reached
EREQUEST / 10929: resource limit reached
EREQUEST / 40550: resource limit reached
EREQUEST / 40604: resource limit reached
EREQUEST / 40611: resource limit reached
EREQUEST / 40648: resource limit reached
EREQUEST / 40652: resource limit reached
EREQUEST / 40656: resource limit reached
EREQUEST / 40658: resource limit reached
EREQUEST / 1204: resource limit reached
EREQUEST / 3627: resource limit reached
EREQUEST / 41340: resource limit reached
resourceType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Access SQL_AUTHENTICATION_ERROR EREQUEST / 18452: authentication error
EREQUEST / 18456: authentication error
EREQUEST / 18470: authentication error
EREQUEST / 18487: authentication error
EREQUEST / 18488: authentication error
EREQUEST / 40505: authentication error
EREQUEST / 40532: authentication error
EREQUEST / 40620: authentication error
EREQUEST / 40623: authentication error
ELOGIN (mssql): authentication error
EFEDAUTH (mssql): authentication error
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Access SQL_AUTHORIZATION_ERROR EREQUEST / 916: authorization error
EREQUEST / 1202: authorization error
EREQUEST / 1230: authorization error
EREQUEST / 4060: authorization error
EREQUEST / 40615: authorization error
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Access SQL_PERMISSION_DENIED EREQUEST / 229: permission denied
EREQUEST / 230: permission denied
EREQUEST / 262: permission denied
EREQUEST / 297: permission denied
EREQUEST / 300: permission denied
EREQUEST / 368: permission denied
EREQUEST / 371: permission denied
EREQUEST / 373: permission denied
EREQUEST / 3110: permission denied
EREQUEST / 40548: permission denied
EREQUEST / 40574: permission denied
EREQUEST / 40644: permission denied
EREQUEST / 40668: permission denied
EREQUEST / 41363: permission denied
EREQUEST / 41376: permission denied
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Access SQL_READ_ONLY_VIOLATION EREQUEST / 3906: read-only violation
EREQUEST / 40573: read-only violation
EREQUEST / 40628: read-only violation
EREQUEST / 652: read-only violation
EREQUEST / 671: read-only violation
EREQUEST / 975: read-only violation
EREQUEST / 1466: read-only violation
EREQUEST / 1924: read-only violation
EREQUEST / 1926: read-only violation
EREQUEST / 2554: read-only violation
EREQUEST / 2596: read-only violation
EREQUEST / 3415: read-only violation
EREQUEST / 3416: read-only violation
EREQUEST / 3740: read-only violation
EREQUEST / 4344: read-only violation
EREQUEST / 4978: read-only violation
EREQUEST / 5048: read-only violation
EREQUEST / 5055: read-only violation
EREQUEST / 5063: read-only violation
EREQUEST / 5244: read-only violation
EREQUEST / 7690: read-only violation
EREQUEST / 9775: read-only violation
EREQUEST / 28014: read-only violation
EREQUEST / 40188: read-only violation
EREQUEST / 41361: read-only violation
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Configuration SQL_CONFIGURATION_ERROR
configurationErrorType
configuration file
- -
Configuration SQL_CONFIGURATION_ERROR
configurationErrorType
lock file
- -
Configuration SQL_CONFIGURATION_ERROR
configurationErrorType
runtime parameter
- -
I/O SQL_IO_ERROR
ioErrorType
read
EREQUEST / 3203: read I/O error
EREQUEST / 4862: read I/O error
ioErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
I/O SQL_IO_ERROR
ioErrorType
write
EREQUEST / 3202: write I/O error
EREQUEST / 4870: write I/O error
EREQUEST / 5149: write I/O error
ioErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
I/O SQL_IO_ERROR
ioErrorType
fsync
- -
I/O SQL_IO_ERROR
ioErrorType
truncate
- -
I/O SQL_IO_ERROR
ioErrorType
file stat
- -
I/O SQL_IO_ERROR
ioErrorType
lock
- -
I/O SQL_IO_ERROR
ioErrorType
unlock
- -
I/O SQL_IO_ERROR
ioErrorType
delete
- -
I/O SQL_IO_ERROR
ioErrorType
file not found
- -
I/O SQL_IO_ERROR
ioErrorType
access
EREQUEST / 3017: access I/O error
EREQUEST / 3061: access I/O error
EREQUEST / 3201: access I/O error
EREQUEST / 4861: access I/O error
EREQUEST / 5120: access I/O error
EREQUEST / 5123: access I/O error
ioErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
I/O SQL_IO_ERROR
ioErrorType
shared memory
- -
I/O SQL_IO_ERROR
ioErrorType
seek
- -
I/O SQL_IO_ERROR
ioErrorType
mmap
- -
I/O SQL_IO_ERROR
ioErrorType
path
EREQUEST / 5133: path I/O error ioErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
I/O SQL_IO_ERROR
ioErrorType
atomic write
- -
I/O SQL_IO_ERROR
ioErrorType
close
- -
I/O SQL_IO_ERROR
ioErrorType
reserved extension
- -
I/O SQL_IO_ERROR
ioErrorType
unknown
EREQUEST / 810: unknown I/O error
EREQUEST / 823: unknown I/O error
EREQUEST / 835: unknown I/O error
EREQUEST / 837: unknown I/O error
EREQUEST / 5159: unknown I/O error
ioErrorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
External SQL_EXTERNAL_DATA_SOURCE_ERROR EREQUEST / 7301: external data source error
EREQUEST / 7302: external data source error
EREQUEST / 7303: external data source error
EREQUEST / 7304: external data source error
EREQUEST / 7305: external data source error
EREQUEST / 7306: external data source error
EREQUEST / 7310: external data source error
EREQUEST / 7311: external data source error
EREQUEST / 7313: external data source error
EREQUEST / 7314: external data source error
EREQUEST / 7317: external data source error
EREQUEST / 7320: external data source error
EREQUEST / 7399: external data source error
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Features SQL_FEATURE_NOT_SUPPORTED EREQUEST / 12300: feature not supported
EREQUEST / 12301: feature not supported
EREQUEST / 12302: feature not supported
EREQUEST / 12303: feature not supported
EREQUEST / 12304: feature not supported
EREQUEST / 12305: feature not supported
EREQUEST / 12306: feature not supported
EREQUEST / 40510: feature not supported
EREQUEST / 40511: feature not supported
EREQUEST / 40512: feature not supported
EREQUEST / 40513: feature not supported
EREQUEST / 40514: feature not supported
EREQUEST / 40515: feature not supported
EREQUEST / 40516: feature not supported
EREQUEST / 40517: feature not supported
EREQUEST / 40518: feature not supported
EREQUEST / 40520: feature not supported
EREQUEST / 40521: feature not supported
EREQUEST / 40522: feature not supported
EREQUEST / 40523: feature not supported
EREQUEST / 40524: feature not supported
EREQUEST / 40525: feature not supported
EREQUEST / 40526: feature not supported
EREQUEST / 40527: feature not supported
EREQUEST / 40528: feature not supported
EREQUEST / 40529: feature not supported
EREQUEST / 40575: feature not supported
EREQUEST / 40576: feature not supported
EREQUEST / 40577: feature not supported
EREQUEST / 40578: feature not supported
EREQUEST / 40579: feature not supported
EREQUEST / 40580: feature not supported
EREQUEST / 40597: feature not supported
EREQUEST / 40598: feature not supported
EREQUEST / 40599: feature not supported
EREQUEST / 13654: feature not supported
EREQUEST / 13655: feature not supported
EREQUEST / 13656: feature not supported
EREQUEST / 13657: feature not supported
EREQUEST / 13658: feature not supported
EREQUEST / 13660: feature not supported
EREQUEST / 13661: feature not supported
EREQUEST / 13662: feature not supported
EREQUEST / 13663: feature not supported
EREQUEST / 324: feature not supported
EREQUEST / 369: feature not supported
EREQUEST / 534: feature not supported
EREQUEST / 1096: feature not supported
EREQUEST / 4122: feature not supported
EREQUEST / 12308: feature not supported
EREQUEST / 12309: feature not supported
EREQUEST / 40051: feature not supported
EREQUEST / 40052: feature not supported
EREQUEST / 40054: feature not supported
EREQUEST / 40058: feature not supported
EREQUEST / 40073: feature not supported
EREQUEST / 42303: feature not supported
EREQUEST / 43203: feature not supported
EREQUEST / 45014: feature not supported
EREQUEST / 45038: feature not supported
EREQUEST / 45043: feature not supported
EREQUEST / 40504: feature not supported
EREQUEST / 40508: feature not supported
EREQUEST / 40536: feature not supported
EREQUEST / 40555: feature not supported
EREQUEST / 40559: feature not supported
EREQUEST / 40584: feature not supported
EREQUEST / 40586: feature not supported
EREQUEST / 40587: feature not supported
EREQUEST / 40606: feature not supported
EREQUEST / 40607: feature not supported
EREQUEST / 13614: feature not supported
EREQUEST / 13616: feature not supported
EREQUEST / 13617: feature not supported
EREQUEST / 13619: feature not supported
EREQUEST / 13665: feature not supported
EREQUEST / 13687: feature not supported
ETDS (mssql): feature not supported
EINTERFACENOTSUPP (mssql): feature not supported
EDEPRECATED (mssql): feature not supported
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Corruption SQL_DATABASE_CORRUPTED
corruptionType
database file
EREQUEST / 211: database file corruption
EREQUEST / 602: database file corruption
EREQUEST / 603: database file corruption
EREQUEST / 606: database file corruption
EREQUEST / 608: database file corruption
EREQUEST / 610: database file corruption
EREQUEST / 669: database file corruption
EREQUEST / 682: database file corruption
EREQUEST / 683: database file corruption
EREQUEST / 684: database file corruption
EREQUEST / 692: database file corruption
EREQUEST / 824: database file corruption
EREQUEST / 829: database file corruption
EREQUEST / 882: database file corruption
EREQUEST / 907: database file corruption
EREQUEST / 3301: database file corruption
EREQUEST / 3302: database file corruption
EREQUEST / 40050: database file corruption
EREQUEST / 40067: database file corruption
EREQUEST / 40072: database file corruption
EREQUEST / 40080: database file corruption
EREQUEST / 40083: database file corruption
EREQUEST / 13642: database file corruption
EREQUEST / 13643: database file corruption
corruptionType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Corruption SQL_DATABASE_CORRUPTED
corruptionType
index
- -
Corruption SQL_DATABASE_CORRUPTED
corruptionType
sequence
- -
Corruption SQL_DATABASE_CORRUPTED
corruptionType
virtual table
- -
Corruption SQL_DATABASE_CORRUPTED
corruptionType
filesystem
- -
Corruption SQL_DATABASE_CORRUPTED
corruptionType
checksum
EREQUEST / 832: checksum corruption corruptionType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Internal SQL_INTERNAL_ERROR
errorType
engine internal
EREQUEST / 13628: engine internal
EREQUEST / 13629: engine internal
EREQUEST / 13630: engine internal
EREQUEST / 13631: engine internal
EREQUEST / 13633: engine internal
EREQUEST / 13634: engine internal
EREQUEST / 13635: engine internal
EREQUEST / 204: engine internal
EREQUEST / 407: engine internal
EREQUEST / 440: engine internal
EREQUEST / 565: engine internal
EREQUEST / 691: engine internal
EREQUEST / 885: engine internal
EREQUEST / 3624: engine internal
EREQUEST / 3696: engine internal
EREQUEST / 8601: engine internal
EREQUEST / 8624: engine internal
EREQUEST / 8630: engine internal
EREQUEST / 9821: engine internal
EREQUEST / 9822: engine internal
EREQUEST / 40640: engine internal
EREQUEST / 40662: engine internal
EREQUEST / 13637: engine internal
errorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Internal SQL_INTERNAL_ERROR
errorType
api misuse
mssql driver API misuse/internal request messages: api misuse errorType
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage
Fallback SQL_UNKNOWN UNKNOWN (mssql): unknown SQL error
MSSQLError: unknown SQL error
databaseErrorCode when available
databaseErrorNumber when available
databaseErrorMessage