Message Reference

SQL0700 - SQL0799

SQL0707NThe object "<name>" cannot be created because the first three characters are reserved for system objects.

Explanation: The following is a list of reserved names:

User Response: Select a name that does not start with a reserved prefix.

sqlcode: -707

sqlstate: 42939

SQL0713NThe replacement value for "<special-register>" is invalid.

Explanation: Either the value specified in the SET <special-register> statement is not a valid value of the indicated special register, or the value specified is NULL as a result of an indicator variable.

The statement cannot be executed.

User Response: Correct the replacement value and/or any indicator variables. See the SQL Reference for an explanation of the valid values of each special register.

sqlcode: -713

sqlstate: 42815

SQL0723NAn error occurred in a triggered SQL statement in trigger "<trigger-name>". Information returned for the error includes SQLCODE "<sqlcode>", SQLSTATE "<sqlstate>" and message tokens "<token-list>"

Explanation: An SQL statement in the trigger "<trigger-name>" has failed during execution of the trigger. The sqlcode, sqlstate and message token list (each token is separated by the vertical bar character) are provided. The message tokens may be truncated. See the corresponding message for the "<sqlcode>" for further explanation of the error.

The trigger and the original SQL statement that caused the trigger to execute cannot be processed.

User Response: Check the message associated with the SQLCODE of the SQL statement that failed. Follow the action suggested by that message.

sqlcode: -723

sqlstate: 09000

SQL0724NThe activation of trigger "<trigger-name>" would exceed the maximum level of cascading.

Explanation: Cascading of triggers occurs when a triggered SQL statement in a trigger would result in another trigger being activated or when a referential constraint delete rule causes additional triggers to be activated. The depth of this cascading is limited to 16.

Note that recursive situations where a trigger includes a triggered SQL statement that directly or indirectly causes the same trigger to be activated is a form of cascading that is very likely to cause this error if there are no conditions to prevent cascading from exceeding the limit.

The "<trigger-name>" specified is one of the triggers that would have been activated at the seventeenth level of cascading.

User Response: Start with the triggers that are activated by the UPDATE, INSERT or DELETE statement that received this error. If any of these triggers are recursive, ensure that there is some condition that prevents the trigger from being activated more than the limit allows. If this is not the cause of the problem, follow the chain of triggers that are activated to determine the chain that exceeds the cascading limit.

sqlcode: -724

sqlstate: 54038

SQL0727NAn error occurred during implicit system action type "<action-type>". Information returned for the error includes SQLCODE "<sqlcode>", SQLSTATE "<sqlstate>" and message tokens "<token-list>".

Explanation: The processing of a statement or command has caused the database manager to implicitly perform additional processing. During this processing an error was encountered. The action attempted is shown by the "<action-type>":

1
implicit rebind of a package

2
implicit prepare of a cached dynamic SQL statement

3
implicit regeneration of a view

4
This return code is reserved for use by DB2.

5
incremental bind of an SQL statement

The sqlcode, sqlstate and message token list (each token is separated by the vertical bar character) are provided. The message tokens may be truncated. See the corresponding message for the "<sqlcode>" for further explanation of the error.

The original SQL statement or command that caused the "<action-type>" cannot be processed and the implicit system action was not successful.

Federated system users: You may have received this message because you dynamically prepared an SQL statement in a pass-through session and then tried to execute the statement after the session was closed.

User Response: Check the message associated with the SQLCODE of the SQL statement that failed. Follow the action suggested by that message.

For an invalid package, the REBIND command can be used to recreate the error or to explicitly validate the package once the cause of the error has been resolved.

For a failure while regenerating a view, the name of the view that failed is recorded in the db2diag.log file. The failing view can be dropped or a change made to the statement or command that caused the view regeneration.

Federated system users: If the statement that failed was dynamically prepared in a pass-through session, open another pass-through session, write and prepare the statement again, and execute it while the session is still open.

sqlcode: -727

sqlstate: 56098

SQL0750NThe source table cannot be renamed because it is referenced in a view, summary table, trigger, SQL function, SQL method, check constraint, or referential constraint.

Explanation: The source table in a RENAME statement cannot be renamed for one or more of the following reasons.

The statement cannot be processed.

User Response: Drop the views, summary table, triggers, SQL functions, SQL methods, check constraints, or referential constraints on the table before issuing the RENAME statement. For views or summary tables dependent on the table, query SYSCAT.VIEWDEP where the table matches BSCHEMA and BNAME columns. For triggers dependent on the table, query SYSCAT.TRIGDEP where the table matches BSCHEMA and BNAME columns. For SQL functions or SQL methods, query SYSCAT.FUNCDEP where the table matches BSCHEMA and BNAME columns. For check constraints on the table, query SYSCAT.CHECKS where the table matches TABSCHEMA and TABBNAME columns. For referential constraints dependent on the table, query SYSCAT.REFERENCES where the table matches TABSCHEMA and TABNAME columns or REFTABSCHEMA and REFTABNAME columns.

sqlcode: -750

sqlstate: 42986

SQL0751NUser defined function or procedure "<function-name>" (specific name "<specific-name>") attempted to execute a statement that is not allowed.

Explanation: The program used to implement the body of a user defined function or procedure is not allowed to execute the statement.

User Response: Remove the statement then recompile the program.

sqlcode: -751

sqlstate: 38003

sqlstate: 42985

SQL0752NConnecting to a database is not permitted within a logical unit of work when the CONNECT type 1 connection setting is in use.

Explanation: An attempt was made to connect to either another database or the same database before issuing a COMMIT or ROLLBACK statement. The request cannot be processed within a CONNECT type 1 environment.

User Response:

sqlcode: -752

sqlstate: 0A001

SQL0773NCase not found for CASE statement.

Explanation: A CASE statement without an ELSE clause was found in the routine body of an SQL procedure. None of the conditions speicified in the CASE statement were met.

User Response: Change the CASE statement to handle all conditions that can occur.

sqlcode: -773

sqlstate: 20000

SQL0776NUse of cursor "<cursor-name>" is not valid.

Explanation: Cursor "<cursor-name>" is specified as the cursor name on a FOR statement in an SQL procedure. The cursor cannot be specified on a CLOSE, FETCH, or OPEN statement within the FOR statement.

User Response: Remove the CLOSE, FETCH, or OPEN statement.

sqlcode: -776

sqlstate: 428D4

SQL0777NNested compound statements are not allowed.

Explanation: Atomic compound statements in the routine body of an SQL procedure cannot be nested.

User Response: Ensure that the SQL procedure does not contain nested atomic compound statements.

sqlcode: -777

sqlstate: 42919

SQL0778NEnd label "<label>" is not the same as the begin label.

Explanation: Label "<label>" specified at the end of a FOR, IF, LOOP, REPEAT, WHILE, or compound statement in an SQL procedure is not the same as the label at the beginning of the statement. You cannot specify an end label if a begin label is not specified.

User Response: Ensure that the end label is the same as the begin label for FOR, IF, LOOP, REPEAT, WHILE, and compound statements.

sqlcode: -778

sqlstate: 428D5

SQL0779NLabel "<label>" specified on a GOTO, ITERATE, or LEAVE statement is not valid.

Explanation: Label "<label>" is specified on a GOTO, ITERATE, or LEAVE statement in an SQL procedure. The label is not defined or is not a valid label for the statement.

The label on an ITERATE statement must be the label for a FOR, LOOP, REPEAT, or WHILE statement.

The label on a LEAVE statement must be the label for a FOR, LOOP, REPEAT, WHILE, or compound statement.

The label on a GOTO must be defined within a scope that the GOTO statement can reach.

User Response: Specify a valid label on the GOTO, ITERATE, or LEAVE statement.

sqlcode: -779

sqlstate: 42736

SQL0780NUNDO is specified for a handler when ATOMIC is not specified for the compound statement.

Explanation: UNDO is specified for a handler in a compound statement in an SQL procedure. UNDO cannot be specified unless the compound statement is ATOMIC.

User Response: Either specify that the compound statement is ATOMIC or specify EXIT or CONTINUE on the handler.

sqlcode: -780

sqlstate: 428D6

SQL0781NCondition "<condition>" specified in a handler is not defined.

Explanation: Condition "<condition>" specified in a handler in an SQL procedure is not defined.

User Response: Define the condition using the DECLARE CONDITION statement or remove the condition from the handler.

sqlcode: -781

sqlstate: 42737

SQL0782NA condition or SQLSTATE value specified in a handler is not valid.

Explanation: A condition or SQLSTATE value specified in a handler in an SQL is not valid for one of the following reasons:

User Response: Remove the condition or SQLSTATE value from the handler.

sqlcode: -782

sqlstate: 428D7

SQL0783NA duplicate column name or unnamed column was specified in a DECLARE CURSOR statement of a FOR statement.

Explanation: The select list in the FOR statement must contain unique column names. The select list specified contains either duplicate column names or unnamed expressions.

User Response: Specify unique column names in the select list specified in the FOR statement.

sqlcode: -783

sqlstate: 42738

SQL0785NThe declaration or use of the SQLSTATE or SQLCODE variable is not valid.

Explanation: SQLSTATE or SQLCODE was used as a variable in the routine body of an SQL routine, but is not valid for one of the following reasons:

The statement cannot be processed.

User Response: Declare the SQLSTATE variable as CHAR(5) and the SQLCODE variable as INTEGER. Set the variable to a valid value.

sqlcode: -785

sqlstate: 428D8

SQL0787NRESIGNAL statement not within a handler.

Explanation: The RESIGNAL statement can only be used inside condition handlers.

User Response: Remove the RESIGNAL statement or use a SIGNAL statement instead.

sqlcode: -787

sqlstate: 0K000

SQL0789NThe data type for parameter or variable "<name>" is not supported in the SQL routine.

Explanation: The SQL routine (function, method, or procedure) does not support variables or parameters of DATALINK, REFERENCE, DISTINCT, STRUCTURED, or LOB data types.

User Response: Do not use SQL variables or parameters of DATALINK, REFERENCE, DISTINCT, STRUCTURED, or LOB data types in the SQL routine definition. Specify a different data type for the parameter or variable "<name>".

sqlcode: -789

sqlstate: 429BB

SQL0797NThe trigger "<trigger-name>" is defined with an unsupported triggered SQL statement.

Explanation: The trigger is defined with a triggered SQL statement that does match the following list.

In some cases the "<trigger-name>" is not available for use in the message.

User Response: Check the triggered SQL statements in the trigger for any statement that does not match the above list and remove it.

sqlcode: -797

sqlstate: 42987

SQL0798NA value cannot be specified for column "<column-name>" which is defined as GENERATED ALWAYS.

Explanation: When inserting or updating a row in a table, a value was specified for the GENERATED ALWAYS column "<column-name>". GENERATED ALWAYS columns should not be specified in the column-list for an INSERT or in the SET clause for an update unless the keyword DEFAULT is specified.

The INSERT or UPDATE is not performed.

User Response: Remove the GENERATED ALWAYS column from the column-list or SET clause, or specify DEFAULT as the column value.

sqlcode: -798

sqlstate: 428C9


[ Top of Page | Previous Page | Next Page ]