Start of change

-4746   THE STATEMENT CANNOT BE PROCESSED FOR AN ACCELERATED QUERY. REASON CODE reason-code.

Explanation

The statement that involves an accelerated query cannot be processed for the reason indicated by reason-code.

reason-code
A numeric value that indicates why the statement cannot be processed. reason-code can have one of the following values:
1
The only FETCH statement that is allowed for a rowset cursor that is run by the accelerator is FETCH NEXT ROWSET.
2
The FOR n ROWS clause must be specified on a FETCH NEXT ROWSET statement for a rowset cursor that is run by the accelerator.
3
The value of n in the FOR n ROWS clause of a FETCH NEXT ROWSET statement does not match the value in the previous FETCH NEXT ROWSET statement.
4
Target host variables must be specified for a FETCH NEXT ROWSET statement for a rowset cursor that is run by the accelerator.
20
Option QUERY ACCELERATION or GET_ACCEL_ARCHIVE is used but is invalid because the DB2® system parameter ACCEL is set to NO, and the DB2 subsystem is not enabled for query acceleration.
21
Option QUERY ACCELERATION or GET_ACCEL_ARCHIVE is used but is invalid because the DB2 table SYSACCEL.SYSACCELERATEDPACKAGES or its indexes do not exist or are not defined correctly.
22
The DB2 table SYSACCEL.SYSACCELERATEDPACKAGES or its indexes do not exist or are not defined correctly.
23
Option QUERY ACCELERATION or GET_ACCEL_ARCHIVE is used but is invalid because the DB2 SYSACCEL tables or indexes do not exist or are not defined correctly.
24
The DB2 SYSACCEL tables or indexes do not exist or are not defined correctly.
Note: Reason codes 20 through 24 apply to the CREATE PROCEDURE and ALTER PROCEDURE statements for native SQL procedures or to the CREATE FUNCTION and ALTER FUNCTION statements for SQL scalar functions. They also apply to a remote bind request with DB2 for z/OS® as the target. These reason codes map to the following BIND or REBIND PACKAGE messages: DSNT320I, DSNT321I, DSNT322I, DSNT323I, and DSNT324I.

System action

The statement cannot be processed.

User response

Use the reason code to determine the cause of the failure and take the appropriate action.

SQLSTATE

560D5

End of change