Db2 SQLCODEs
Look up Db2 SQLCODEs, their diagnostic details and possible fixes.
All 104 codes
SQLCODE -010String constant not terminatedSQLCODE +100Row not foundSQLCODE -101Statement too long or too complexSQLCODE -104Illegal symbol in the statementSQLCODE -117Number of values doesn't match columnsSQLCODE -119Column or expression in HAVING not validSQLCODE -120Aggregate function not valid in contextSQLCODE -122Column or expression in SELECT list not validSQLCODE -138SUBSTR argument out of rangeSQLCODE -150Operation not allowed on this view or tableSQLCODE -151Column cannot be updatedSQLCODE -171Invalid argument to a functionSQLCODE -180Invalid date, time or timestamp stringSQLCODE -181Date or time value out of rangeSQLCODE -199Illegal use of a keywordSQLCODE -203Ambiguous column referenceSQLCODE -204Undefined object nameSQLCODE -205Column not in the named tableSQLCODE -206Column name not validSQLCODE -208ORDER BY column not in result tableSQLCODE -30081Communication error detectedSQLCODE -30082Connection failed for a security reasonSQLCODE -301Input host variable type can't be usedSQLCODE -302Input value invalid or too largeSQLCODE -303Output variable type not compatibleSQLCODE -304Value out of range for host variableSQLCODE -305Null value with no indicator variableSQLCODE -310Decimal host variable holds non-decimal dataSQLCODE -311Input host variable length not validSQLCODE -312Host variable not defined or not usableSQLCODE -313Host variables do not match parameter markersSQLCODE -401Operands not comparableSQLCODE -404String too long for the columnSQLCODE -406Derived numeric value out of rangeSQLCODE -407Null value in a NOT NULL columnSQLCODE -408Value not compatible with target typeSQLCODE -413Overflow during numeric conversionSQLCODE -420String argument not acceptable to functionSQLCODE -421Set operands have different column countsSQLCODE -433Value too longSQLCODE -440No routine with compatible argumentsSQLCODE -444User program could not be foundSQLCODE -471Routine invocation failedSQLCODE -501Cursor not openSQLCODE -502Cursor already openSQLCODE -503Column not in the cursor's FOR UPDATE listSQLCODE -504Cursor name not declaredSQLCODE -507Cursor not open for UPDATE or DELETESQLCODE -508Cursor not positioned on a rowSQLCODE -514Cursor not in a prepared stateSQLCODE -516DESCRIBE names an unprepared statementSQLCODE -518EXECUTE names an invalid prepared statementSQLCODE -530Foreign key value has no parentSQLCODE -532Delete restricted by a foreign keySQLCODE -538Foreign key doesn't match parent keySQLCODE -540Table definition incomplete, missing indexSQLCODE -542Key column allows nullsSQLCODE -543Delete blocked by a check constraintSQLCODE -545Row violates a check constraintSQLCODE -551Not authorized for the operationSQLCODE -552Missing privilege for the operationSQLCODE -567Bind authorization errorSQLCODE -577Routine not allowed to modify dataSQLCODE -579Routine not allowed to read dataSQLCODE -601Object name already existsSQLCODE -603Duplicate rows block a unique indexSQLCODE -604Invalid length, precision or scaleSQLCODE -607Operation not allowed on this objectSQLCODE -612Duplicate nameSQLCODE -624Table already has a primary keySQLCODE -679Drop pending on the objectSQLCODE -007Illegal character in the statementSQLCODE -723Error in a triggered SQL statementSQLCODE -724Too many levels of cascadingSQLCODE -802Arithmetic overflow or divide by zeroSQLCODE -803Duplicate keySQLCODE -804Error in the program's SQL input parametersSQLCODE -805Package not found in planSQLCODE -808CONNECT not consistent with the first CONNECTSQLCODE -811More than one row returnedSQLCODE -812Blank collection ID in CURRENT PACKAGESETSQLCODE -817Prohibited data change operationSQLCODE -818Timestamp mismatch between program and DBRMSQLCODE -084Unacceptable SQL statementSQLCODE -840Too many items in a select or insert listSQLCODE -842Connection already existsSQLCODE -900Not connected to a serverSQLCODE -901System error, later statements can runSQLCODE -904Resource unavailableSQLCODE -905Resource limit exceededSQLCODE -906Function disabled by a prior errorSQLCODE -909Object deleted or alteredSQLCODE -911Deadlock or timeout, rolled backSQLCODE -913Deadlock or timeout, not rolled backSQLCODE -922Authorization failureSQLCODE -923Connection not establishedSQLCODE -924Db2 connection internal errorSQLCODE -925COMMIT not valid in IMS, CICS or RRSAFSQLCODE -926ROLLBACK not valid in IMS, CICS or RRSAFSQLCODE -927Language interface called without a connectionSQLCODE +304Value out of range for host variable (warning)SQLCODE +394Optimization hints usedSQLCODE +445Value has been truncatedSQLCODE +802Arithmetic exception (warning)
No matching codes
Try the code number, part of the message, or another spelling.
Working with Db2 errors
Keep the SQLCODE, SQLSTATE, statement and diagnostic tokens together. Negative codes, warnings and not-found conditions need different handling. These guides primarily discuss Db2 for z/OS; platform differences are called out where relevant.
Browse all 494 error codes · WND Terminal’s offline code hints
Use WND Terminal with your host system
WND Software develops WND Terminal Emulator for mainframe, IBM i and UNIX access. For connection and keyboard features, see the 3270 terminal emulator or 5250 emulator for IBM i. Explain this screen provides screen-specific assistance using the model endpoint and context permitted by IT; the reference article explains the code independently.