Cause: The program attempted to either: (1) FETCH using a cursor, or (2) CLOSE a cursor at a time when the specified cursor was not open.
The statement cannot be processed.
Action: Check for a previous message (SQLCODE) that may have closed the cursor. Note that after the cursor is closed, any fetches or close cursor statements receive SQLCODE -501.
If no previous SQLCODEs have been issued, correct the application program to ensure that the cursor is open when the FETCH or CLOSE statement is executed.
sqlcode: -501
sqlstate: 24501
Cause: The program attempted to execute an OPEN statement for an open cursor.
The statement cannot be processed. The cursor was unchanged.
Action: Correct the application program to ensure it does not attempt to execute an OPEN statement for a cursor already open.
sqlcode: -502
sqlstate: 24502
Cause: Using a cursor, the program attempted to update a value in a table column that was not identified in the FOR UPDATE clause in the cursor declaration or the prepared SELECT statement.
Any column to be updated must be identified in the FOR UPDATE clause of the cursor declaration.
The statement cannot be processed.
Action: Correct the application program. If the column requires updating, add its name to the FOR UPDATE clause of the cursor declaration.
sqlcode: -503
sqlstate: 42912
Cause: An UPDATE or DELETE WHERE CURRENT OF "<name>" was specified, but the cursor "<name>" was not declared in the application program.
The statement cannot be processed.
Action: Ensure the completeness of the application program and correct spelling errors in the cursor names.
sqlcode: -504
sqlstate: 34000
Cause: The cursor name specified in the DECLARE statement has already been declared.
The statement cannot be processed.
Action: Ensure the name is spelled correctly.
Cause: The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement when the specified cursor was not open.
The statement cannot be processed. No update or delete was performed.
Action: Check for a previous message (SQLCODE) that may have closed the cursor. Note that after the cursor is closed, any fetches or close cursor statements receive SQLCODE -501 and any updates or deletes receive SQLCODE -507. Correct the logic of the application program to ensure that the specified cursor is open at the time the UPDATE or DELETE statement is executed.
sqlcode: -507
sqlstate: 24501
Cause: The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement when the specified cursor was not positioned on an object table row. The cursor must be positioned on the row to be updated or deleted.
The cursor is no longer positioned on a row if the row is deleted.
DataJoiner users: the record in a remote data source has been updated and/or deleted by another application (or a different cursor within this application) and the record no longer exists.
The statement cannot be processed. No data is updated or deleted.
Action: Correct the logic of the application program to ensure that the cursor is correctly positioned on the intended row of the object table before the UPDATE or DELETE statement is executed. Note that the cursor is not positioned on a row if FETCH returned message SQL0100W (SQLCODE = 100).
sqlcode: -508
sqlstate: 24504
Cause: The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement where the table named did not match the name of the table specified in the SELECT statement that declared the cursor.
The statement cannot be processed.
Action: Correct the application program to ensure that the table identified in the UPDATE or DELETE statement is the same table identified in the cursor declaration.
sqlcode: -509
sqlstate: 42827
Cause: The program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement against a table or view definition that does not permit the requested update or delete operation. For example, this error can occur in a delete from a read-only view or in an update where the cursor was not defined with the FOR UPDATE clause.
On the database manager the view is read-only if the SELECT statement
Note that these conditions do not apply to subqueries of the SELECT statement.
The cursor is declared with a FOR FETCH ONLY or ORDER BY clause.
The cursor is ambiguous and the BLOCKING ALL bind option was specified.
The statement cannot be processed.
Action: If the database manager is failing the statement and the cursor is based on a read-only SELECT or VALUES statement, do not issue any update or delete statements against it.
If the database manager is failing the statement and the cursor is not based on a read-only SELECT or VALUES statement and is defined with a FOR FETCH ONLY or ORDER BY clause, either remove this clause from the cursor definition or do not issue any update or delete statements.
If the database manager is failing the statement and the cursor cannot be determined to be either fetch only or updateable from its definition or context, rebind the program with either the BLOCKING NO or BLOCKING UNAMBIG bind option.
DataJoiner users: isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source). If a data source is failing the request, examine the restrictions for that data source to determine the cause of the problem and its solution. If the restriction exists on a data source, see the SQL reference manual for that data source to determine why the object is not updatable.
sqlcode: -510
sqlstate: 42828
Cause: The result table of the SELECT or VALUES statement cannot be updated.
On the database manager, the result table is read-only if the cursor is based on a VALUES statement or the SELECT statement contains any of the following:
Note that these conditions do not apply to subqueries of the SELECT statement.
The statement cannot be processed.
Action: Do not perform updates on the result table as specified.
DataJoiner users: isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source). If a data source is failing the request, examine the restrictions for that data source to determine the cause of the problem and its solution. If the restriction exists on a data source, see the SQL reference manual for that data source to determine why the object is not updatable.
sqlcode: -511
sqlstate: 42829
Cause: The UPDATE or DELETE statement does not contain a WHERE clause so all rows of the table or view are modified if this statement is executed.
The statement is accepted.
DataJoiner users: not all data sources report this warning condition. DataJoiner attempts to issue this warning whenever the condition exists, but there is no guarantee that DataJoiner can always detect this condition. Do not rely on this warning to preclude UPDATE/DELETE operations from affecting an entire table or view.
Action: Ensure that you intend to modify the entire table or view.
Cause: The application program tried to use a cursor "<name>" that is not in a prepared state. The cursor is associated with a statement that either (1) was never prepared, (2) was made not valid by a ROLLBACK, or (3) was made not valid by either an explicit or implicit rebind of the package.
The statement cannot be processed.
Action: For case (1), prepare the statement named in the DECLARE CURSOR statement for "<name>" before you try to open the cursor. For case (2), do not issue a ROLLBACK until after you finish using the cursor. For case (3), the prepare for the cursor must be reissued.
sqlcode: -514
sqlstate: 26501
Cause: The statement name in the DESCRIBE statement must specify a statement that was prepared in the same database transaction.
The statement cannot be processed.
Action: Verify that the statement name specifies a statement that has been prepared.
sqlcode: -516
sqlstate: 26501
Cause: The cursor "<name>" could not be used as specified because the prepared statement named in the cursor declaration was not a SELECT or VALUES statement.
The statement cannot be processed.
Action: Verify that the statement name is specified correctly in the PREPARE and the DECLARE CURSOR for cursor "<name>" statements. Or correct the program to ensure that only prepared SELECT or VALUES statements are used in association with cursor declarations.
sqlcode: -517
sqlstate: 07005
Cause: The application program tried to EXECUTE a statement that (1) was never prepared, (2) was made not valid by a ROLLBACK, (3) is a SELECT or VALUES statement, or (4) was made not valid by either an explicit or implicit rebind of the package.
The statement cannot be processed.
Action: For case (1), prepare the statement before attempting the EXECUTE. For case (2), either do not issue a ROLLBACK until after you finish using the prepared statement, or prepare the statement again after the ROLLBACK. For case (3), ensure that the statement is not a SELECT or VALUES statement. For case (4), the prepare for the cursor must be reissued.
sqlcode: -518
sqlstate: 07003
Cause: The application program attempted to prepare the SELECT or VALUES statement for the specified cursor when that cursor is already open.
The statement cannot be prepared. The cursor was not affected.
Action: Correct the application program so it does not attempt to prepare the SELECT or VALUES statement for a cursor that is open.
sqlcode: -519
sqlstate: 24506
Cause: One of the following:
The variables are:
The statement cannot be executed.
Action: If the SQL statement is not supposed to execute at the indicated location, then correct the program so that the statement in error does not execute at that location. Precompile, compile, and bind replace the package. If the SQL statement is supposed to execute at the indicated location, correct the problem found when it was bound and bind the package over using BIND with ACTION(REPLACE). If multiple versions of the package have been bound, issue the following SELECT statement to determine which version has the error: SELECT VERSION FROM locid.SYSIBM.SYSPACKAGE WHERE LOCATION = ' ' AND COLLID = 'collid' AND NAME = 'pkgid' AND HEX(CONTOKEN) = 'contoken'
Where:
sqlcode: -525
sqlstate: 51015
Cause: The SQL statement being executed refers to a temporary table. A temporary table cannot be used in the given context.
The statement cannot be processed.
Action: Modify the SQL statement to ensure that the object references are not to temporary tables.
sqlcode: -526
sqlstate: 42995
Cause: A UNIQUE clause uses the same column list as the PRIMARY KEY clause, another UNIQUE clause or the PRIMARY KEY or a UNIQUE constraint that already exists for the table "<tablename>". Duplicate unique constraints are not allowed.
"<name>" is the constraint name, if one was specified or exists. If a constraint name is not specified, "<name>" is the first column name specified in the column list of the UNIQUE clause followed by three periods.
The statement cannot be processed.
Action: Remove the duplicate UNIQUE clause or change the column list to a set of columns that is not already part of a unique constraint.
sqlcode: -528
sqlstate: 42891
Cause: A value in a foreign key of the object table is being set, but this value is not equal to any value of the parent key of the parent table.
When a row is inserted into a dependent table, the insert value of a foreign key must be equal to some value of the parent key of any row of the parent table of the associated relationship.
Similarly, when the value of a foreign key is updated, the update value of a foreign key must be equal to the value of the parent key of any row of the parent table of the associated relationship at the completion of the statement.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Some DataJoiner data sources do not provide the appropriate values for "<constraint name>". In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown.
The statement could not be executed. The contents of the object table are unchanged.
Action: Examine the insert or update value of the foreign key first, and then compare it with each of the parent key values of the parent table to determine and correct the problem.
sqlcode: -530
sqlstate: 23503
Cause: An operation attempted to update a parent key in the row of the parent table but the parent key in the specified row has dependent rows in the dependent table associated with it in the "<constraint-name>" constraint.
When the update rule of constraint "<constraint-name>" is NO ACTION, the value of a parent key in a parent row cannot be updated if the parent row has any dependent rows at the completion of the statement.
When the update rule of constraint "<constraint-name>" is RESTRICT, the value of a parent key in a parent row cannot be updated if the parent row has any dependent rows at the time the update of the parent key is attempted.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Some DataJoiner data sources do not provide the appropriate values for "<constraint name>". In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown.
The statement could not be executed. The contents of the parent table are unchanged.
Action: Examine the parent key of the object table and the foreign key of the dependent table to determine if the value of the specified row of the parent key should be changed. If this does not show the problem, examine the contents of the object table and the dependent table to determine and correct the problem.
sqlcode: -531
sqlstate: 23001, 23504
Cause: An operation attempted to delete a specified row of the parent table but the parent key in the specified row has dependent rows in the referential constraint "<constraint-name>" and the delete rule of NO ACTION or RESTRICT is specified for the relationship.
When the delete rule of constraint "<constraint-name>" is NO ACTION, a row of the parent table cannot be deleted if the dependent rows are still dependent on the parent key at the completion of the statement.
When the delete rule of constraint "<constraint-name>" is RESTRICT, a row of the parent table cannot be deleted if the parent row has any dependent rows at the time of the delete.
Note that a delete can cascade to delete other rows in dependent tables that have a delete rule of NO ACTION or RESTRICT. Thus the constraint "<constraint-name>" may be on a different table than the original delete operation.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Some DataJoiner data sources do not provide the appropriate values for "<constraint name>". In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown.
The statement could not be executed. The contents of the table are unchanged.
Action: Examine the delete rule for all descendent tables to determine and correct the problem. The specific tables involved can be determined from the relationship "<constraint-name>".
sqlcode: -532
sqlstate: 23001, 23504
Cause: An INSERT operation with a fullselect attempted to insert multiple rows into a table that is a parent and a dependent in the same relationship of a referential constraint.
The fullselect of the INSERT operation should return no more than one row of data.
The INSERT statement could not be executed. The contents of the object table are unchanged.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Action: Examine the search condition of the fullselect to ensure selection of no more than one row of data.
sqlcode: -533
sqlstate: 21501
Cause: An UPDATE operation attempted to perform a multiple-row update of a column included in a primary key or unique index.
Multiple-row updates of columns of a primary key or unique index are not supported.
The UPDATE statement could not be executed. The contents of the table are unchanged.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Action: Ensure the search condition of the UPDATE statement selects only one object table row to update.
sqlcode: -534
sqlstate: 21502
Cause: A DELETE operation with a WHERE clause attempted to delete multiple rows from a table which is a parent and a dependent in the same relationship of a referential constraint with a RESTRICT or SET NULL delete rule.
The WHERE clause of the DELETE operation should select no more than one row of data.
The DELETE statement could not be executed. The contents of the object table are unchanged.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Action: Examine the WHERE clause search condition to ensure no more than one row of data is selected.
NOTE: This is only a restriction in releases of DB2 prior to Version 2.
sqlcode: -535
sqlstate: 21504
Cause: A DELETE operation was attempted with the indicated table referenced in a subquery.
The indicated table referenced in a subquery of the DELETE statement can be affected because it is either:
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Some DataJoiner data sources do not provide the appropriate values for "<name>". In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown.
The statement could not be processed.
Action: Do not reference a table in a DELETE statement subquery when the table can be affected by the DELETE statement.
NOTE: This error is only applicable to releases of DB2 prior to Version 2 and hosts accessed through DB2 Connect.
sqlcode: -536
sqlstate: 42914
Cause: The column "<name>" appears more than once in a PRIMARY KEY clause, FOREIGN KEY clause, UNIQUE clause or PARTITIONING KEY clause of a CREATE or ALTER statement.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Some DataJoiner data sources do not provide the appropriate values for "<name>". In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown.
The statement cannot be processed.
Action: Specify unique names for each column.
sqlcode: -537
sqlstate: 42709
Cause: The definition of the indicated foreign key does not conform to the parent key description of the table "<table-name>".
Possible errors are:
"<name>" is the constraint name if specified in the FOREIGN KEY clause. If a constraint name was not specified, "<name>" is the first column name specified in the clause followed by three periods.
DataJoiner users: some DataJoiner data sources do not provide the appropriate values for "<name>" and "<table-name>". In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown.
The constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
The statement cannot be processed.
Action: Correct the statement so the foreign key description conforms to the parent key description.
sqlcode: -538
sqlstate: 42830
Cause: One of the following occurred:
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Some DataJoiner data sources do not provide the appropriate values for "<name>" and "<key-type>". In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown.
The statement cannot be processed. A system catalog cannot be defined as a parent in a referential constraint.
Action: When creating a referential constraint, specify the primary key before specifying any foreign keys (constraints).
sqlcode: -539
sqlstate: 42888
Cause: The table named was defined with a PRIMARY KEY clause or a UNIQUE clause. Its definition is incomplete, and it cannot be used until a unique index is defined for the primary key (the primary index) and for each set of columns in any UNIQUE clause (the required unique indexes). An attempt was made to use the table in a FOREIGN KEY clause or in an SQL manipulative statement.
The statement cannot be executed.
Action: Define a primary index or a required unique index on the table before referencing it.
sqlcode: -540
sqlstate: 57001
Cause: If "<name>" refers to a referential constraint, then a FOREIGN KEY clause uses the same foreign key and parent table as another FOREIGN KEY clause.
If "<name>" refers to a primary key or unique constraint, then one of the following situations exists.
"<name>" is the constraint name, if specified. If a constraint name was not specified, "<name>" is the first column name specified in the column list of the FOREIGN KEY or UNIQUE clause followed by three periods.
DataJoiner users: the constraint can exist on DataJoiner (if the child and parent tables exist as tables on DataJoiner), or it can exist on the data source (if the child and parent tables exist on the data source).
Some DataJoiner data sources do not provide the appropriate values for "<name>". In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown.
The indicated referential constraint or unique constraint was not created. The statement was processed successfully.
Action: No action is required. Processing can continue.
sqlcode: +541
sqlstate: 01543
Cause: The column "<name>" identified in a PRIMARY KEY clause or UNIQUE clause is defined to allow null values.
DataJoiner users: some DataJoiner data sources do not provide the appropriate values for "<name>". In these cases the appropriate fields contain values (such as "unknown") that indicate that the actual value is unknown.
The statement cannot be processed.
Action: Correct the column, primary key or unique key definition.
sqlcode: -542
sqlstate: 42831
Cause: The delete operation cannot be executed because the target table is a parent table and is connected with a referential constraint to a dependent table with a delete rule of SET NULL. However, a check constraint defined on the dependent table restricts the column from containing a null value.
The statement cannot be processed.
Action: Examine the foreign key and its delete rule in the dependent table and the conflicting check constraint. Change either the delete rule or the check constraint so that they do not conflict with each other.
sqlcode: -543
sqlstate: 23511
Cause: At least one existing row in the table violates the check constraint that is be added in the ALTER TABLE statement.
The statement cannot be processed.
Action: Examine the check constraint definition that was specified in the ALTER TABLE statement and the data in the table to determine why there is a violation of the constraint. Change either the check constraint or the data so that the constraint is not violated.
sqlcode: -544
sqlstate: 23512
Cause: Check constraint violations can occur on either INSERT or UPDATE operations. The resulting row violated the check constraint definition on that table.
The statement cannot be processed.
Action: Examine the data and the check constraint definition in the catalog view SYSCAT.CHECKS to determine why the INSERT or UPDATE statement failed. Change the data so that the constraint is not violated.
sqlcode: -545
sqlstate: 23513
Cause: A check constraint in the CREATE TABLE or ALTER TABLE statement is invalid for one or more of the following reasons:
The statement cannot be processed.
Action: The user response is one of the following, depending on the cause of the error:
sqlcode: -546
sqlstate: 42621
Cause: A check constraint in the CREATE TABLE or ALTER TABLE statement is invalid for one or more of the following reasons:
The token within the text of the error message lists the invalid item.
The statement cannot be processed.
Action: The user response is one of the following, depending on the cause of the error:
sqlcode: -548
sqlstate: 42621.
Cause: Authorization ID "<authorization-ID>" attempted to perform the specified "<operation>" on "<name>" without the proper authorization.
If creating or altering a table with referential constraints, this message (SQLCODE) can indicate that the user does not have the REFERENCES privilege to create or drop a FOREIGN KEY. In this case the "<operation>" is "REFERENCES" and the "<name>" is the object the constraint references.
If attempting to run a DB2 utility or CLI application, the DB2 utility programs may need to be rebound to the database because the userid who created the database no longer exists or no longer has the required privileges.
DataJoiner users: if this message is returned when the user is changing the remote_pw column of the SYSCAT.REMOTEUSERS view, the user is not authorized to change a password for another user. The user performing the alter operation must have either SYSADM authority or an authorization ID (the value in the USER special register) that matches the value of the authid column in the rows being updated. Some data sources do not provide the appropriate values for "<authid>", <operation>, and <name>. In these cases the message tokens will have the following format: "<data source> AUTHID:UNKNOWN", "UNKNOWN", and "<data source>:TABLE/VIEW", indicating that the actual values for the authid, operation, and name at the specified data source are not known.
The statement cannot be processed.
Action: Ensure that "<authorization-ID>" has the authorization necessary to perform the operation.
DataJoiner users: this authorization can be at DataJoiner, the data source, or both.
If the DB2 utility programs need to be rebound to the database, the database administrator can accomplish this by issuing one of the following CLP command from the bnd subdirectory of the instance, while connected to the database:
sqlcode: -551
sqlstate: 42501
Cause: Authorization ID "<authorization-ID>" attempted to perform the specified "<operation>" without the proper authorization.
DataJoiner users: some DataJoiner data sources do not provide the appropriate values for "<authorization-ID>" and <operation>. In these cases the message tokens will have the following format: "<data source> AUTHID:UNKNOWN", and "UNKNOWN" indicating that the actual values for authid and operation at the specified data source are not known.
The statement cannot be processed.
Action: Ensure that "<authorization-ID>" has the authorization to perform the operation.
DataJoiner users: this authorization can be at DataJoiner, the data source, or both.
sqlcode: -552
sqlstate: 42502
Cause: The reason the schema name "<schema-name>" is invalid depends on the type of object that is being created.
The statement cannot be processed.
Action: Use a valid schema name or remove the explicit schema name and rerun the statement.
sqlcode: -553
sqlstate: 42939
Cause: An authorization ID attempted to execute a GRANT statement where the authorization ID itself appears as one of the entries in the authorization ID list to which privileges are to be granted.
The statement cannot be processed.
Action: Remove the authorization ID from the list.
sqlcode: -554
sqlstate: 42502
Cause: An authorization ID attempted to execute a REVOKE statement where the authorization ID itself appears as one of the entries in the authorization ID list from which privileges are to be revoked.
The statement cannot be processed.
Action: Remove the authorization ID from the list.
sqlcode: -555
sqlstate: 42502
Cause: The privilege cannot be revoked because "<authorization-ID>" does not hold the privilege.
The statement cannot be processed.
Action: Change the REVOKE statement to conform to the REVOKE rules and resubmit the statement. Ensure that when a REVOKE statement lists several privileges to be revoked and a list of authorization IDs that each authorization ID possesses at least one of the specified privileges.
sqlcode: -556
sqlstate: 42504
Cause: One of the following occurred:
The statement cannot be processed.
Action: Correct and resubmit the statement.
sqlcode: -557
sqlstate: 42852
Cause: "<authorization-ID>" holds the "<control>" privilege. The privilege to be revoked is implicit in the "<control>" privilege, so it cannot be revoked unless the "<control>" privilege is also revoked.
The valid values for "<control>" are the following:
The statement cannot be executed. No privileges are revoked.
Action: Revoke the "<control>" privilege, if desired.
sqlcode: -558
sqlstate: 42504
Cause: The GRANT statement attempted to grant a database privilege to the reserved authorization ID PUBLIC (public). DBADM authority cannot be granted to PUBLIC (public).
The statement cannot be processed.
Action: The implied function is not supported.
sqlcode: -562
sqlstate: 42508
Cause: The authorization ID specified by "<authorization-ID>" is not valid for one of the following reasons:
The statement cannot be processed.
Action: Correct the invalid authorization ID.
sqlcode: -567
sqlstate: 42602
Cause: The GRANT or REVOKE statement specified an authorization name that may identify both a user and a group in the security namespace, and did not explicitly specify the USER or GROUP keyword in the statement. The statement is therefore ambiguous. Note that when using DCE security, the USER or GROUP keyword is always required.
Action: Change the statement to explicitly specify the USER or GROUP keyword to uniquely identify the required authorization id.
sqlcode: -569
sqlstate: 56092
Cause: A GRANT operation was attempted on object "<object-name>" of type "<object-type>", but some or all of the privileges were not granted. The authorization ID that issued the statement does not have all of the privileges to be granted with grant option or does not have DBADM authority.
All valid requested privileges were granted.
Action: Obtain the required authority and try the the operation again.
sqlcode: +570
sqlstate: 01007
Cause: The package "<pkgname>" is marked as inoperative and must be explicitly rebound before it can be used. This package cannot be used because one or more user-defined functions that it depends upon have been dropped.
Action: Explicitly rebind the named package using either the REBIND or the BIND command.
sqlcode: -572
sqlstate: 51028
Cause: A list of column names was specified in the references clause for the constraint identified by "<name>" that does not match the column names of the primary key or any unique key of the referenced table "<table-name>".
"<name>" is the constraint name, if specified. If a constraint name was not specified, "<name>" is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods.
The statement cannot be processed.
Action: Correct the column list in the references clause or add the unique constraint to the referenced table.
sqlcode: -573
sqlstate: 42890
Cause: The DEFAULT value for column "<column-name>" in table "<table-name>" is not valid. The possible reason codes are as follows:
The statement cannot be processed.
Action: Correct the DEFAULT value based on the reason code that was returned.
sqlcode: -574
sqlstate: 42894
Cause: The view or summary table "<name>" has been marked inoperative because a table, view, alias, or privilege upon which it is dependent has been removed. The view cannot be used by any SQL statement other than one of the following:
The statement cannot be processed.
Action: If "<name>" is a view, recreate the view by issuing a CREATE VIEW statement using the same view definition as the inoperative view. If "<name>" is a summary table, recreate the summary table by issuing the CREATE TABLE statement using the same summary table definition as in the inoperative summary table.
sqlcode: -575
sqlstate: 51024
Cause: The alias definition of "<name>" on "<name2>" would have resulted in a repetitive alias chain which could never be resolved. For example, "alias A refers to alias B which refers to alias A" is a repetitive alias chain which could never be resolved.
The statement cannot be processed.
Action: Change the alias definition for "<name>" or revise the definition of one of the other alias definitions in the alias chain to avoid a repetitive chain.
sqlcode: -576
sqlstate: 42916
Cause: There is a CASE expression in the statement that has all the result-expressions (expressions following THEN and ELSE keywords) coded with the keyword NULL.
The statement cannot be processed.
Action: Change the CASE expression to include at least one result-expression that is other than the keyword NULL.
sqlcode: -580
sqlstate: 42625
Cause: There is a CASE expression in the statement that has result-expressions (expressions following THEN and ELSE keywords) that are not compatible.
The data type of a CASE expression is determined using the "Rules for Result Data Types" on the result-expressions. The data types of the result-expressions may be incompatible for one of the following reasons:
The statement cannot be processed.
Action: Correct the result-expressions so that they are compatible.
sqlcode: -581
sqlstate: 42804
Cause: A search condition of a CASE expression is:
and the CASE expression is part of:
Such CASE expressions are not supported. The CASE expression may be part of a function written in SQL.
The statement cannot be processed.
Action: Remove the use of the quantified predicate, IN predicate, or EXISTS predicate from the CASE expression. If the CASE expression is part of a function, the query may need to be written without the function that causes the error.
sqlcode: -582
sqlstate: 42625
Cause: The function "<function-name>" is defined as a variant function or a function with an external action. This type of function is not supported in the context in which it is used. The contexts in which these are not valid are:
The statement cannot be processed.
Action: If the use of a variant or external action function was not intended, substitute a function without these characteristics. If the behaviour associated with the variant or external action function is intentional, use the alternate form of the statements that make that intent explicit.
sqlcode: -583
sqlstate: 42845
Cause: DEFAULT can only be used in a VALUES clause that is part of an INSERT statement.
A VALUES clause that is not part of an INSERT statement must have a value other than NULL in at least one row for each column.
If DEFAULT is used as a column-name in a WHERE or HAVING clause, it must be capitalized and enclosed in double quotes.
DataJoiner users: DEFAULT can not be used in a VALUES clause of an INSERT statement where the object is a nickname.
Action: Substitute a value other than NULL or DEFAULT in the VALUES clause. If DEFAULT is used as a column-name, capitalize it and enclose it in double quotes.
sqlcode: -584
sqlstate: 42608
Cause: The function path includes "<schema-name>" more than once. The function path can only include one occurrence of each schema name.
The statement cannot be processed.
Action: Remove duplicate occurrences of "<schema-name>" from the function path.
sqlcode: -585
sqlstate: 42732
Cause: The CURRENT FUNCTION PATH special register is defined as a VARCHAR(254). The content of the string includes each schema name delimited with double quotes and separated from the next schema name by a comma. The total length of the string of all schema names in the CURRENT FUNCTION PATH cannot exceed 254 characters. The SET CURRENT FUNCTION PATH statement or the FUNCPATH option of the PREP or BIND command causing this message would exceed this limit.
The statement or command cannot be processed.
Action: Remove schema names to reduce the total length to fit the 254 character maximum length. If all the schema names are required, it may be necessary to consolidate some user-defined functions so that less schema names are required on the CURRENT FUNCTION PATH.
sqlcode: -586
sqlstate: 42907
Cause: The isolation level specified is not supported by DB2. It has been escalated to the next higher level of isolation supported by DB2.
Action: To avoid this warning, specify an isolation level which is supported by DB2. DB2 supports isolation levels Repeatable Read (RR), Read Stability (RS), Cursor Stability (CS), and Uncommitted Read (UR).
sqlcode: +595
sqlstate: 01526
Cause: An index was required for an ALTER TABLE operation that defined a primary key or a unique key, and the indicated index matches the required index.
When creating a primary key or unique key index, an index description matches if it identifies the same set of columns (in any order) as the primary or unique key without regard to ascending or descending specifications, and is specified as unique.
The statement is processed successfully.
Action: No action is required.
sqlcode: +598
sqlstate: 01550
Cause: Comparison functions are not created for a distinct type based on a long string data type (BLOB, CLOB, DBCLOB, LONG VARCHAR, or LONG VARGRAPHIC) since the corresponding functions are not available for these built-in data types.
This is a warning situation. The statement is processed successfully.
Action: No action is required.
sqlcode: +599
sqlstate: 01596