DB2 SQL Errors Codes and Error Messages and Warnings from Error -557 to -559

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-557, SQLSTATE=42852, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INCONSISTENT GRANT/REVOKE
KEYWORD keyword. PERMITTED
KEYWORDS ARE keyword-list
Explanation: The GRANT or REVOKE statement
contains a syntax or spelling error at or before the
specified ‘keyword’. As an aid to the programmer,
‘keyword-list’ provides a list of the keywords that
would be permitted in this context.
Alternatively:
v The mixture of privileges specified on the GRANT or
REVOKE statement is not permitted. The privileges
must all be of one type, and consistent with the form
of the GRANT or REVOKE statement.
v REVOKE UPDATE (column-list) is not permitted;
only REVOKE UPDATE is valid.
v The keywords DELETE, INSERT, SELECT, TRIGGER,
UPDATE, REFERENCES and ALTER cannot be
specified for an auxiliary table.
System action: The statement cannot be executed.
Programmer response: Correct the syntax of the
GRANT or REVOKE statement.
SQLSTATE: 42852
Error: DB2 SQL Error: SQLCODE=-558, SQLSTATE=56025, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVALID CLAUSE OR COMBINATION
OF CLAUSES ON A GRANT OR
REVOKE
Explanation: The location qualifier specified for a
GRANT or REVOKE statement is invalid.
System action: The statement cannot be processed.
Programmer response: Correct the syntax, and reissue
the statement.
SQLSTATE: 56025
Error: DB2 SQL Error: SQLCODE=-559, SQLSTATE=57002, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
ALL AUTHORIZATION FUNCTIONS
HAVE BEEN DISABLED
Explanation: The authorization mechanism has been
disabled in the DB2 subsystem. Consequently, GRANT
and REVOKE statements are ignored.
System action: The statement cannot be executed. No
privileges were granted or revoked.
Programmer response: Do not attempt to execute
GRANT or REVOKE statements unless and until the
authorization mechanism is enabled in the DB2
subsystem.
SQLSTATE: 57002

Above are list of DB2 SQL Errors and Warnings from Error -557 to -559 received while performing certain operation against DB2 Database or related products.

SQLCODE – Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE is set by DB2 after each SQL statement is
executed. DB2 conforms to the ISO/ANSI SQL standard as follows:
If SQLCODE = 0, execution was successful.
If SQLCODE > 0, execution was successful with a warning.
If SQLCODE < 0, execution was not successful.
SQLCODE = 100, “no data” was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table.

SQLSTATE – SQLSTATE is also set by DB2 after the execution of each SQL statement. Thus, application programs can check the execution of SQL statements by testing SQLSTATE instead of SQLCODE.

Hope this was helpful.

Thanks,
SQLServerF1 Team
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *