-
Notifications
You must be signed in to change notification settings - Fork 4
/
SQLSTATEs
76 lines (66 loc) · 2.48 KB
/
SQLSTATEs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Following SQLStates are MonetDB JDBC driver specific:
01M02 redirect warning
01M03 illegal arguments (invalid call of internal function)
01M07 unrecognised clientinfo property
01M08 read-only conection mode not supported
01M09 transaction mode not supported
01M10 unexpected server output
01M11 server-client autocommit state mismatch
01M13 concurrency mode not supported
01M14 scrolling mode not supported
01M15 holdability mode not supported
01M18 generated keys for columns not supported
01M21 cursors not supported
01M22 JDBC escape syntax not supported
01M23 field size limitation not supported
01M24 query time out not supported (not used/needed anymore)
08M01 opening logfile failed
08M26 invalid URI
08M33 connection timed out
0AM21 cursors not supported
0AM34 Java generics not supported
22M28 invalid BLOB format
22M29 invalid inet format
22M30 invalid URL format
22M31 invalid UUID format
22M32 invalid JSON format
22M33 invalid Date format
22M34 invalid Time format
22M35 invalid Timestamp format
22M36 invalid Time with time zone format
22M37 invalid Timestamp with time zone format
2BM37 dependent objects still exist
2DM30 autocommit mode active
3BM30 autocommit mode active
42M31 user/role already exists
42M32 user/role not found
42M35 sequence not found
42M36 cannot restart sequence with NULL
M0M03 illegal arguments (invalid call of internal function)
M0M04 only supported in SQL mode
M0M06 savepoint is not MonetSavepoint
M0M10 protocol violation/unexpected server response
M0M12 matching client handle referenced by server not found
M0M27 unknown error
M0M29 assert
M1M05 invalid argument (user supplied)
M1M16 multistatements not supported in batches
M1M17 result set not expected for DML or DDL-statement
M1M19 response is not a result set
M1M20 object closed
M1M25 failed reading from/writing to object stream
SQLState codes are used in SQLExceptions.
JDBC 4.2 defines the following SQLException subclass mappings:
NonTransientSQLExceptions (fails when same operation executed again)
0A SQLFeatureNotSupportedException
08 SQLNonTransientConnectionException
22 SQLDataException
23 SQLIntegrityConstraintViolationException
28 SQLInvalidAuthorizationSpecException
42 SQLSyntaxErrorException
TransientSQLExeceptions (retry of same operation might succeed)
08 SQLTransientConnectionException
40 SQLTransactionRollbackException
null SQLTimeoutException
See also: http://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html
See also: https://en.wikipedia.org/wiki/SQLSTATE