home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC63100 Status: Geschlossen

DBMS_SQL.Parse does not execute TRUNCATE sql statement

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
If the SQL command is a DDL command, it is immediately executed 
and does not require running the EXECUTE procedure. 
This does not work for TRUNCATE sql statement. 
This APAR fixes this issue. 
 
For example, we have following statements in a stored procedure: 
----------------------------------------------- 
curid := DBMS_SQL.OPEN_CURSOR; 
statement := 'TRUNCATE TABLE tab_name'; 
DBMS_SQL.Parse(curid, statement, DBMS_SQL.native); 
DBMS_SQL.CLOSE_CURSOR(curid); 
----------------------------------------------- 
 
After executing these statement, we will find that the table did 
not get truncated.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All.                                                         * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* If the SQL command is a DDL command, it is immediately       * 
* executed                                                     * 
* and does not require running the EXECUTE procedure.          * 
*                                                              * 
* This does not work for TRUNCATE sql statement.               * 
*                                                              * 
* This APAR fixes this issue.                                  * 
*                                                              * 
*                                                              * 
*                                                              * 
* For example, we have following statements in a stored        * 
* procedure:                                                   * 
* -----------------------------------------------              * 
*                                                              * 
* curid := DBMS_SQL.OPEN_CURSOR;                               * 
*                                                              * 
* statement := 'TRUNCATE TABLE tab_name';                      * 
*                                                              * 
* DBMS_SQL.Parse(curid, statement, DBMS_SQL.native);           * 
*                                                              * 
* DBMS_SQL.CLOSE_CURSOR(curid);                                * 
*                                                              * 
* -----------------------------------------------              * 
*                                                              * 
*                                                              * 
*                                                              * 
* After executing these statement, we will find that the table * 
* did                                                          * 
* not get truncated.                                           * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to version 9.7 fixpack 1 or later.                   * 
****************************************************************
Local-Fix:
As a workaround you can include the DBMS_SQL.Execute(curid) as 
follows, so that the table can really get truncated. 
-------------------------------------------- 
curid := DBMS_SQL.OPEN_CURSOR; 
statement := 'TRUNCATE TABLE tab_name'; 
DBMS_SQL.Parse ( curid, statement, DBMS_SQL.native); 
v_status := DBMS_SQL.Execute (curid); 
DBMS_SQL.CLOSE_CURSOR(curid); 
--------------------------------------------
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
This problem is first fixed in version 9.7 fixpack 1.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
10.09.2009
22.12.2009
22.12.2009
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP1
Problem behoben lt. FixList in der Version
9.7.0.1 FixList