SQL Negative Return Codes

The SQL return codes are listed here numerically, you may browse through them or you may enter the code you are looking for and press the enter key to go directly to the return code description.

The codes are broken up into numeric ranges to make the HTML documents smaller and thus load faster. They are basically divided into the groups by the hundreds digit, (ie 0-99, 100-199 and etc.). However each section has the index for all the negative return codes.

-007 -010 -029 -060 -084 -101 -102 -103 -104 -105 -107 -109 -110 -111 -112 -113 -115 -117 -118 -119 -120 -121 -122 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -136 -137 -138 -144 -150 -151 -153 -154 -156 -157 -158 -159 -160 -161 -164 -170 -171 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -191 -198 -199 -203 -204 -205 -206 -207 -208 -219 -220 -221 -250 -251 -301 -302 -303 -304 -305 -309 -311 -312 -313 -314 -330 -331 -332 -333 -401 -402 -404 -405 -406 -407 -408 -409 -410 -411 -412 -414 -415 -416 -417 -418 -419 -421 -426 -427 -501 -502 -503 -504 -507 -508 -509 -510 -511 -512 -513 -514 -516 -517 -518 -519 -525 -530 -531 -532 -533 -534 -535 -536 -537 -538 -539 -540 -542 -551 -552 -553 -554 -555 -556 -557 -558 -559 -567 -571 -601 -602 -603 -604 -607 -612 -613 -614 -615 -616 -618 -619 -620 -621 -622 -623 -624 -625 -626 -627 -628 -629 -631 -932 -633 -634 -635 -636 -637 -638 -639 -644 -646 -647 -652 -653 -660 -661 -662 -663 -665 -666 -667 -668 -669 -670 -671 -676 -677 -678 -679 -680 -681 -682 -683 -684 -685 -686 -687 -688 -689 -690 -691 -692 -693 -694 -715 -716 -717 -718 -719 -720 -721 -722 -726 -730 -731 -732 -733 -734 -735 -736 -737 -752 -802 -803 -804 -805 -807 -811 -812 -815 -817 -818 -819 -820 -822 -840 -900 -901 -902 -904 -905 -906 -907 -908 -909 -910 -911 -913 -917 -918 -922 -923 -924 -925 -926 -927 -950
-30000 -30020 -30021 -30030 -30040 -30041 -30050 -30051 -30052 -30053 -30060 -30061 -30070 -30071 -30072 -30073 -30074 -30080 -30090

SQL Code -30000
EXECUTION FAILED DUE TO A DISTRIBUTION PROTOCOL ERROR THAT WILL NOT AFFECT THE SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS OR SQL STATEMENTS: REASON reason-code (sub-code)

Explanation: A DRDA protocol error has resulted which prevented successful execution of the current SQL statement. The error was such that it will not preclude the successful execution of further SQL statements. The 'reason-code' identifies the DDM code point which represents the DDM reply message received from the remote server in response to the attempt to execute the SQL statement. These represent internal errors detected at the remote server or possibly, by the local DB2 functions. The 'reason-code' value is the two-byte hexadecimal code point for the DDM reply message that represents the error and is one of the following:

  • X'1254' - CMDCHKRM
  • X'220A' - DSCINVRM
  • X'220E' - DTAMCHRM
  • X'1245' - PRCCNVRM
  • X'2202' - QRYNOPRM
  • X'220F' - QRYPOPRM
  • X'2207' - RDBACCRM
  • X'2204' - RDBNACRM
  • X'124C' - SYNTAXRM

A two-byte 'sub-code' accompanies 'reason-codes' X'220A' (DSCINVRM), X'1245' (PRCCNVRM), and X'124C' (SYNTAXRM). In all other cases, the 'sub-code' is zero.

The 'sub-code' when non-zero, consists of two bytes such that the high-order byte indicates the site at which the error was detected. This is X'01' if the error was detected by the local DB2; it is X'02' if the error was detected by the remote server. The low-order byte is dependent on the 'reason-code' as follows:

  1. Description Error Code (DSCERRCD) if 'reason-code' = X'220A' (DSCINVRM).
  2. Syntax Error Code (SYNERRCD) if 'reason-code' = X'124C' SYNTAXRM).
  3. Conversational Protocol Error Code (PRCCVNCD) if 'reason-code' = X'1245' (PRCCNVRM).

Refer to the IBM Distributed Data Management (DDM) Reference Guide for a detailed discussion of the semantics of the DDM terms DSCERRCD, SYNERRCD, and PRCCNVCD.

System Action: The statement cannot be executed. The SQLCA is formatted.

Programmer Response: Notify the DBA for assistance in analysis of the SQL statement which yielded this SQLCODE.

SQLSTATE: 58008


SQL Code -30020
EXECUTION FAILED DUE TO A DISTRIBUTION PROTOCOL ERROR THAT CAUSED DEALLOCATION OF THE CONVERSATION: REASON

Explanation: A DRDA protocol error has occurred that prevented the successful execution of the current SQL statement or command, as well as any subsequent SQL statements. The 'reason-code' identifies the DDM code point which represents the DDM reply message received from the remote server in response to the attempt to execute the SQL statement. These represent internal errors detected at the remote server site or possibly, by the local DB2 functions. The 'reason-code' value is the two-byte hexadecimal code point for the DDM reply message that represents the error and is one of the following:

  • X'1232' - AGNPRMRM
  • X'1254' - CMDCHKRM
  • X'220A' - DSCINVRM
  • X'220E' - DTAMCHRM
  • X'0010' - FDODSC
  • X'1218' - MGRDEPRM
  • X'1245' - PRCCNVRM
  • X'241A' - QRYDSC
  • X'2202' - QRYNOPRM
  • X'220F' - QRYPOPRM
  • X'2207' - RDBACCRM
  • X'2204' - RDBNACRM
  • X'124C' - SYNTAXRM

A two byte sub-code accompanies 'reason codes'. The sub-code, when non-zero, consists of two bytes such that the high-order byte indicates the site at which the error was detected. This is X'01' if the error was detected by the local DB2; It is X'02' if the error was detected by the remote server. The low-order byte is dependent upon the 'reason code' as follows:

Description Error Code (DSCERRCD) if reason code= X'220A ' (DSCINVRM). Syntax Error Code (SYNERRCD) if reason code = X'124C ' (SYNTAXRM). Conversational Protocol Error Code (PRCCVNCD) if reason code = X'1245 ' (PRCCNVRM). Manager Dependency Error Code (DEPERRCD) if reason code = X' 1218 ' (MGRDEPRM).

Refer to IBM Distributed Data Management (DDM) Reference Guide for a detailed discussion of the semantics of the DDM terms DSCERRCD, SYNERRCD, PRCCNVCD, and DEPERRCD.

System Action: The statement cannot be executed. The SQLCA is formatted and the conversation on which the error was detected is deallocated.

Programmer Response: Notify SQLCODE. The connection to the server has been broken, and the server has, therefore, rolled back the unit of work. In this case, the only SQL statement that may be successfully executed is ROLLBACK. However, if the requester detects this error on a COMMIT, then it is unknown whether the unit of work was committed or rolled back at the server.

SQLSTATE: 58009


SQL Code -30021
EXECUTION FAILED DUE TO A DISTRIBUTION PROTOCOL ERROR THAT WILL AFFECT THE SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS OR SQL STATEMENTS: MANAGER manager AT LEVEL level NOT SUPPORTED ERROR

Explanation: A DRDA error has occurred that prevented the successful execution of the current SQL statement or command, as well as any subsequent SQL statements. A manager level conflict has been detected during the processing of the DDM EXCSAT command. Refer to the IBM Distributed Data Management (DDM) Reference Guide for a detailed description of EXCSAT processing and errors. The manager value is the two-byte hexadecimal code point of the DDM manager class identified as not supported in the EXCSATRD that reported the error. Refer to the DDM term MGRLVL in the IBM Distributed Data Management (DDM) Reference Guide for the two-byte hexadecimal values. The level value is the two-byte hexadecimal value of the manager level identified as not supported in the EXCSATRD that reported the error. Refer to the DDM term MGRLVL in the IBM Distributed Data Management (DDM) Reference Guide for the two-byte hexadecimal values.

System Action: The statement cannot be executed. An 04E ABEND is requested and the application is not permitted to issue additional SQL statements.

Programmer Response: Notify the system programmer for analysis of the abend that caused this SQLCODE.

SQLSTATE: 58010


SQL Code -30030
COMMIT REQUEST WAS UNSUCCESSFUL, A DISTRIBUTION PROTOCOL VIOLATION HAS BEEN DETECTED, THE CONVERSATION HAS BEEN DEALLOCATED. ORIGINAL SQLCODE=original-sqlcode AND ORIGINAL SQLSTATE=original-sqlstate

Explanation: The application requested COMMIT operation was unsuccessful and the response from the remote server and the SQLCODE that was returned from the remote server are inconsistent. For example, the reply message from the remote server indicates that a COMMIT operation did not complete successfully but the SQLCODE returned from the remote server was greater than or equal to zero. The unit of work has been rolled back and the connection with the remote server has been deallocated.

System Action: An alert was generated. A DSNL031I message may have been written to the console. Refer to the description of this message for further information.

The SQLCODE returned by the remote server is replaced with -30030 and the SQLSTATE returned by the AS is replaced with '158013' and the connection with the remote server has been deallocated.

The SQLCODE and SQLSTATE values that were returned from the remote server are stored in the SQLERRM field in a string of the following format. 'original-sqlcode 'FF'X original-sqlstate'

Programmer Response: Notify the system programmer for assistance in analyzing the trace data that was generated.

SQLSTATE: 58013


SQL Code -30040
EXECUTION FAILED DUE TO UNAVAILABLE RESOURCES THAT WILL NOT AFFECT THE SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS OR SQL STATEMENTS. REASON TYPE OF RESOURCE RESOURCE NAME PRODUCT ID RDBNAME

Explanation: The SQL statement or command requires a non RDB resource that is currently unavailable. The identifies why the resource identified by the and is unavailable. The product, product level, and RDB are identified. unavailable. The product, product level, and RDB are identified.

Values for - This is product specific and can be found in the remote server documentation.

Values for - Two byte hexadecimal number defined as follows: This is product specific and can be found in the remote server documentation.

Values for - Variable length field with alphanumeric characters and a maximum length of 35 bytes.

Values for - Eight-byte field with alphanumeric characters defined as follows: ppp....... DSN for DB2, ARI for SQL/DS, SQL for OS/2 and QSQ for AS/400 (3 bytes) vv........ version number (2 bytes) rr........ release level (2 bytes) m......... modification level (1 byte) Values for Sixteen-byte field with the RDBNAME.

System Action: The statement cannot be executed. The local DB2 is disconnected from the remote server.

Programmer Response: Verify the identify of the resource that was not available. The reason the resource is unavailable is identified by the . Collect the following diagnostic items to help determine the cause of the unavailable resource.

  • Console output from the system identified by RDBNAME, and a listing of SYSLOG data set for the period of time spanning the failure.
  • Information described for the reason code received.

SQLSTATE: 57012


SQL Code -30041
EXECUTION FAILED DUE TO UNAVAILABLE RESOURCES THAT WILL AFFECT THE SUCCESSFUL EXECUTION OF SUBSEQUENT COMMANDS AND SQL STATEMENTS REASON TYPE OF RESOURCE RESOURCE NAME PRODUCT ID RDBNAME

Explanation: The SQL statement or command requires a non RDB resource that is currently unavailable. The identifies why the resource identified by the and is unavailable. The product, product level, and RDB are identified.

Values for - Four byte binary number that is product specific. This can be found in the remote server documentation.

Values for - Two byte hexadecimal number that is product specific. This can be found in the remote server documentation.

Values for - Variable length field with alphanumeric characters and a maximum length of 35 bytes.

Values for - Eight byte field with alphanumeric characters defined as follows: ppp....... DSN for DB2, ARI for SQL/DS, SQL for OS/2 and QSQ for AS/400 (3 bytes) vv........ version number (2 bytes) rr........ release level (2 bytes) m......... modification level (1 byte)

Values for - Sixteen byte field with the RDBNAME.

System Action: The statement cannot be executed. The local DB2 is disconnected from the remote server.

Programmer Response: Verify the identity of the resource that was not available. The reason the resource is unavailable is identified by the reason-code.

Collect the following diagnostic items to help determine the cause of the unavailable resource.

  • Console output from the system identified by RDBNAME, and a listing of SYSLOG data set for the period of time spanning the failure.
  • Information described for the received.

SQLSTATE: 57013


SQL Code -30050
COMMAND OR SQL STATEMENT INVALID WHILE BIND PROCESS IN PROGRESS

Explanation: A remote command or remote SQL execution was attempted while a remote bind was in progress. The only commands allowed during bind are, BIND STATEMENT, END BIND, ROLLBACK, or COMMIT.

System Action: The request is rejected. The local DB2 is disconnected from remote server.

Programmer Response: Ensure the remote bind has completed before attempting to execute an SQL statement or process a remote command. COMMIT and ROLLBACK will terminate the bind processing.

SQLSTATE: 58011


SQL Code -30051
BIND PROCESS WITH SPECIFIED PACKAGE NAME AND CONSISTENCY TOKEN NOT ACTIVE

Explanation: Binding of a statement or end bind was attempted while the package was not undergoing bind processing.

System Action: The bind statement request or end bind request is rejected. The local DB2 is disconnected from the remote server.

Programmer Response: Ensure that the server processing the bind request was not abending when this request was being processed, or that the package name hasn't changed before terminating the remote bind package request.

SQLSTATE: 58012


SQL Code -30052
PROGRAM PREPARATION ASSUMPTIONS ARE INCORRECT

Explanation: The program preparation assumptions in effect for binding a statement (i.e. BINDSQLSTT command) are incorrect.

System Action: The statement is rejected.

Programmer Response: The creation of the package following this error is dependent on the package creation options specified at begin bind time.

SQLSTATE: 56032


SQL Code -30053
OWNER AUTHORIZATION FAILURE

Explanation: An authorization error associated with the package owner is detected. The AS, for example, has determined that the binder has specified a package owner that the binder has no authorization to specify.

System Action: The begin bind request is rejected.

Programmer Response: Correct the authorization problem and reissue the request.

SQLSTATE: 42506


SQL Code -30060
RDB AUTHORIZATION FAILURE

Explanation: The user is not authorized to access an RDB.

System Action: The request is rejected.

Programmer Response: Correct the authorization problem and resubmit the job.

SQLSTATE: 42507


SQL Code -30061
RDB NOT FOUND

Explanation: An attempt was made to access an RDB which cannot be found.

System Action: The request is not processed.

Programmer Response: Ensure the RDB name has been correctly specified and resubmit the job. resubmit the job.

SQLSTATE: 52017


SQL Code -30070
COMMAND NOT SUPPORTED ERROR

Explanation: The target does not support a particular command. The error causes termination of the connection between the local DB2 and the remote server.

Values for Two byte hexadecimal DDM code point.

System Action: The command is rejected. The local DB2 is disconnected from the remote server.

Programmer Response: Ensure the proper command was issued.

SQLSTATE: 58014


SQL Code -30071
OBJECT NOT SUPPORTED ERROR

Explanation: The target does not support a particular object. The error causes the termination of the connection between the local DB2 and the remote server.

Values for Two byte hexadecimal DDM code point.

System Action: The command/SQL statement is rejected. The local DB2 is disconnected from the remote server.

Programmer Response: Ensure the object has been correctly specified and resubmit the job or reissue the command.

SQLSTATE: 58015


SQL Code -30072
: PARAMETER NOT SUPPORTED ERROR

Explanation: A particular parameter is not supported by either the application requester or the remote server.

Values for - Two byte hexadecimal DDM code point.

Values for - Two byte hexadecimal number defined as follows: This subcode is composed of two distinct parts, but may optionally be zero. The high-order byte (when not zero) indicates the site at which the error was detected. This is X'01' if the error was detected by the local DB2; it is X'02' if the error was detected by the remote server. The low order byte is always zero.

System Action: The command/SQL statement is rejected. A disconnect has occurred.

Programmer Response: The connection to the server has been broken, and the server has therefore rolled back the unit of work. In this case, the only SQL statement that may be successfully executed is ROLLBACK. However, if the requestor detects this error on a COMMIT, then it is unknown whether the unit of work was committed or rolled back at the server.

SQLSTATE: 58016


SQL Code -30073
: PARAMETER VALUE NOT SUPPORTED ERROR

Explanation: A particular parameter value is not supported by either the local DB2 or the remote server.

Values for - Two byte hexadecimal DDM code point.

Values for - Two byte hexadecimal number defined as follows: This subcode is composed of two distinct parts, but may optionally be zero. The high-order byte (when not zero) indicates the site at which the error was detected. This is X'01' if the error was detected by the local DB2; it is X'02' if the error was detected by the remote server. The low order byte is always zero.

System Action: The command/SQL statement is rejected. A disconnect has occurred.

Programmer Response: The connection to the server has been broken, and the server has, therefore, rolled back the unit of work. In this case, the only SQL statement that may be successfully executed is ROLLBACK. However, if the requester detects this error on a COMMIT, then it is unknown whether the unit of work was committed or rolled back at the server.

SQLSTATE: 58017


SQL Code -30074
REPLY MESSAGE WITH codepoint (svrcod) NOT SUPPORTED ERROR

Explanation: A reply message 'codepoint' is not recognized or the reply message 'SVRCOD' is not recognized. The error does not affect the processing of subsequent DRDA commands and SQL statements issued by the application program.

Values for 'codepoint' - The 'codepoint' is a two-byte hexadecimal value that represents a DDM reply message. IBM Distributed Data Management (DDM) Reference Guide defines the valid 'codepoints' for reply messages.

Values for 'svrcod' - The 'svrcod' is a one-byte hexadecimal value which represents the reply messages severity code. IBM Distributed Data Management (DDM) Reference Guide defines the valid 'SVRCOD' values for reply messages.

System Action: Processing continues.

Programmer Response: The cause of this error may be a mismatch in source and target manager levels or may be an internal error.

SQLSTATE: 58018


SQL Code -30080
COMMUNICATION ERROR code (subcode)

Explanation: A SNA communications error has been detected. Values for 'code (subcode)': Appendix A of the VTAM Programming for LU6.2 contains the valid 'code' and 'subcode' values that can appear in this message. - 'code' is VTAM's primary LU6.2 return code (RCPRI). - 'subcode' is VTAM's secondary LU6.2 return code (RCSEC).

System Action: The statement is not executed. The application has been disconnected from the server because of a communication failure. The application is in an unconnected but connectable state.

Programmer Response: Review the diagnostic information described in Appendix A VTAM Programming for LU 6.2, SC31-6410 for the particular LU6.2 return codes. Consult with a communications expert to determine the cause of the communication failure.

SQLSTATE: 58019


SQL Code -30090
REMOTE OPERATION INVALID FOR APPLICATION EXECUTION ENVIRONMENT

Explanation: An update operation or a dynamic commit or rollback was attempted at a server that was supporting an application that was in a read-only execution environment (IMS or CICS).

System Action: The request is rejected.

Programmer Response: Do not attempt to update data or issue dynamic commits or rollbacks from IMS or CICS applications that are accessing remote data.

SQLSTATE: 56026