14.7.9 Error codes and trouble-shooting information

Errors reported by the IBMDB2I engine may originate from two locations. Error values under 2500 originate in DB2 for i. Error values over 2500 originate in the storage engine itself. Occasionally, errors are reported by IBMDB2I but, due to the architecture of MySQL, cannot be directly exposed to MySQL client interfaces. In these cases, issuing a SHOW ERRORS statement or referring to the MySQL error log may be necessary to determine the cause of a failure. Errors which originate in DB2 for i are usually encountered in the DB2 for i SQL Server Mode job (QSQSRVR) which services the MySQL client connection; additional information about failures can often be found by looking in the job log of the associated QSQSRVR job.

Following is the list of codes and messages for errors that occur in DB2 for i that are reported by the IBMDB2I engine. %d and %s represent numbers and strings, respectively, that are replaced when the message is displayed.

Table 14.10 Error Codes from IBMDB2I

Error Code NumberError Message Text
0Successful
2016Thread ID is too long
2017Error creating a SPACE memory object
2018Error creating a FILE memory object
2019Error creating a SPACE synchronization token
2020Error creating a FILE synchronization token
2021See message %-.7s in joblog for job %-.6s/%-.10s/%-.10s.
2022Error unlocking a synchronization token when closing a connection
2023Invalid action specified for an 'object lock' request
2024Invalid action specified for a savepoint request
2025Partial keys are not supported with an ICU sort sequence
2026Error retrieving an ICU sort key
2027Error converting single-byte sort sequence to UCS-2
2028An unsupported collation was specified
2029Validation failed for referenced table of foreign key constraint
2030Error extracting table for constraint information
2031Error extracting referenced table for constraint information
2032Invalid action specified for a 'commitment control' request
2033Invalid commitment control isolation level specified on 'open' request
2034Invalid file handle
2036Invalid option specified for returning data on 'read' request
2037Invalid orientation specified for 'read' request
2038Invalid option type specified for 'read' request
2039Invalid isolation level for starting commitment control
2040Error unlocking a synchronization token in module QMYALC
2041Length of space for returned format is not long enough
2042SQL XA transactions are currently unsupported by this interface
2043The associated QSQSRVR job was killed or ended unexpectedly.
2044Error unlocking a synchronization token in module QMYSEI
2045Error unlocking a synchronization token in module QMYSPO
2046Error converting input CCSID from short form to long form
2048Error getting associated CCSID for CCSID conversion
2049Error converting a string from one CCSID to another
2050Error unlocking a synchronization token
2051Error destroying a synchronization token
2052Error locking a synchronization token
2053Error recreating a synchronization token
2054A space handle was not specified for a constraint request
2055An SQL cursor was specified for a delete request
2057Error on delete request because current UFCB for connection is not open
2058An SQL cursor was specified for an object initialization request
2059An SQL cursor was specified for an object override request
2060A space handle was not specified for an object override request
2061An SQL cursor was specified for an information request
2062An SQL cursor was specified for an object lock request
2063An SQL cursor was specified for an optimize request
2064A data handle was not specified for a read request
2065A row number handle was not specified for a read request
2066A key handle was not specified for a read request
2067An SQL cursor was specified for an row estimation request
2068A space handle was not specified for a row estimation request
2069An SQL cursor was specified for a release record request
2070A statement handle was not specified for an 'execute immediate' request
2071A statement handle was not specified for a 'prepare open' request
2072An SQL cursor was specified for an update request
2073The UFCB was not open for read
2074Error on update request because current UFCB for connection is not open
2075A data handle was not specified for an update request
2076An SQL cursor was specified for a write request
2077A data handle was not specified for a write request
2078An unknown function was specified on a process request
2079A share definition was not specified for an 'allocate share' request
2080A share handle was not specified for an 'allocate share' request
2081A use count handle was not specified for an 'allocate share' request
2082A 'records per key' handle was not specified for an information request
2083Error resolving LOB address
2084Length of a LOB space is too small
2085An unknown function was specified for a server request
2086Object authorization failed. See message %-.7s in joblog for job %-.6s/%-.10s/%-.10s. for more information.
2088Error locking mutex on server
2089Error unlocking mutex on server
2090Error checking for RDB name in RDB Directory
2091Error creating mutex on server
2094Error unlocking mutex
2095Error connecting to server job
2096Error connecting to server job
2098Function check occurred while registering parameter spaces. See job log.
2101End of block
2102The file has changed and might not be compatible with the MySQL table definition
2103Error giving pipe to server job
2104There are open object locks when attempting to deallocate
2105There is no open lock
2108The maximum value for the auto_increment data type was exceeded
2109Error occurred closing the pipe
2110Error occurred taking a descriptor for the pipe
2111Error writing to pipe
2112Server was interrupted
2113No pipe descriptor exists for reuse
2114Error occurred during an SQL prepare statement
2115Error occurred during an SQL open
2122An unspecified error was returned from the system.
  
  

Following is the list of error codes and messages that occur within the IBMDB2I storage engine.

Table 14.11 Error Codes and Messages in IBMDB2I

Error Code NumberError Message Text
2501Error opening codeset conversion from %.64s to %.64s (errno = %d). Resolution: Alter the table definition to specify a character set that is supported by the IBMDB2I engine.
2502Invalid %-.10s name '%-.128s. Resolution: If a field name, ensure that it is less than the maximum length of 126 characters.If an index name, ensure that the length of the index name plus the length of the table name is less than 121 characters.
2503Unsupported move from '%-.128s' to '%-.128s' on RENAME TABLE statement. Resolution: Moving a table from one schema to another is not supported by the IBMDB2I engine. Create a new table in the 'to' schema, copy the data to the new table, and then drop the old table.
2504The %-.64s character set is not supported. Resolution: Try using another character set.
2505Auto_increment is not allowed for a partitioned table. Resolution: Remove the auto_increment attribute from the table or do not partition the table.
2506Character set conversion error due to unknown encoding scheme %d. Resolution: Alter the table definition to ensure that character sets assigned to columns are supported by the IBMDB2I engine.
2508Table '%-.128s' was not found by the storage engine. Resolution: A table definition exists in MySQL, but the correspondingtable in DB2 for i is not found. Delete the MySQL table or restore the DB2 table.
2509Could not resolve to %-.128s in library %-.10s type %-.10s (errno = %d). Resolution: Restore the missing IBM i object to the system.
2510Error on _PGMCALL for program %-.10s in library %-.10s (error = %d). Resolution: This is an internal error.
2511Error on _ILECALL for API '%.128s' (error = %d). Resolution: This is an internal error.
2512Error in iconv() function during character set conversion (errno = %d). Resolution: Ensure the text being inserted contains only valid code points for the associated character set. This may be caused by using ENCRYPT or COMPRESS on a text field, resulting in binary data containing invalid characters.
2513Error from Get Encoding Scheme (QTQGESP) API: %d, %d, %d Resolution: This is an internal error.
2514Error from Get Related Default CCSID (QTQGRDC) API: %d, %d, %d. Resolution: This is an internal error.
2515Data out of range for column '%.192s'. Resolution: DB2 for i does not support a zero value for DATE and DATETIME data types. Specify a new value for the column.
2516Schema name '%.128s' exceeds maximum length of %d characters. Resolution: Change the schema name so that its length does not exceed the maximum. For mixed case or lowercase names, permit 2 characters for outer quotation marks.
2517Multiple collations not supported in a single index. Resolution: DB2 for i only supports sort sequences at the table or index level, so all character-based columns in the primary key or index must be using the same collation. Alter the table definition so that all columns use the same collation.
2518Sort sequence was not found. Resolution: Alter the table to use a collation that is supported by the IBMDB2I engine.
2519One or more characters in column %.128s were substituted during conversion. Resolution: This is a warning that during the conversion of data from MySQL to DB2 some characters were replaced with substitute characters.
2520A decimal column exceeded the maximum precision. Data may be truncated. Resolution: A decimal column specified on a CREATE TABLE or ALTER TABLE command has greater precision than DB2 permits. Data stored in this column may be truncated. Change the column specification to have a precision less than or equal to 63.
2521Some data returned by DB2 for table %s could not be converted for MySQL. Resolution: This is a warning that some data could not be converted from DB2 to MySQL. Data was likely inserted into the table using DB2 interfaces that is valid data for DB2 but is invalid for MySQL.
2523Column %.128s contains characters that cannot be converted. Resolution: An error occurred converting data from the MySQL character set to the associated DB2 coded character set identifier (CCSID).Omit the incompatible characters or alter the table to specify a different character set for the column.
2524An invalid name was specified for ibmdb2i_rdb_name. Resolution: Specify a valid relational database (RDB) name.
2525A duplicate key was encountered for index '%.128s'. Resolution: : Specify a unique key value for the row. Generally, this error occurs if a unique constraint or index has been applied to the table from a non-MySQL interface.
2528Some attribute(s) defined for column '%.128s' may not be honored by accesses from DB2.