DB2 - Problem description
Problem IT06593 | Status: Closed |
TRANSACTIONS WITH A FAILING DECLARE GLOBAL TEMPORARY TABLE STATE MENT AND A DYNAMIC COMPOUND STATEMENT MAY FAIL WITH -901 SQLCODE | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
A single transaction that includes a faing DECLARE GLOBAL TEMPORARY TABLE statement followed (within the same transaction, but not necessarily immediately as the following statement) by the execution of dynamic compount SQL statements (also known as anonymous blocks) may fail with a -901 sqlcode when the transaction commits: SQL0901N The SQL statement or command failed because of a database system error. (Reason "sqlrl_userTempReleaseFIDTID: tablespace entry not found".) SQLSTATE=58004 Example, consider a single transaction with the following statements: a) failing declare global temporary table statements DECLARE GLOBAL TEMPORARY TABLE T1 (C1 int NOT NULL UNIQUE) NOT LOGGED --> this will fail with a SQL0526N b) dynamic compound SQL statement (anonymous block) begin execute immediate 'insert into PERM values 1,2,3,4 '; end Will result in the SQL0901N. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Declared Global Temporary tables and dynamic compound SQL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Updgrade to LUW Version 10.5 fixpack 7 * **************************************************************** | |
Local Fix: | |
Change the failing DECLARE GLOBAL TEMPORARY TABLE statement so that it does not fail or avoid use of the dynamic compound SQL in the same transaction as the DECLARE GLOBAL TEMPORARY TABLE statement | |
Solution | |
Fixed in DB2 for LUW Version 10.5 fixpack 7 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 19.01.2015 19.01.2016 28.04.2016 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.7 |