Latest versionsfixlist
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
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC84601 Status: Closed

DB2TOP DUMPS CORE ON AIX WHEN SHOWING SQL TEXT LOGNER THAN 8028 BYTES

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
db2top dumps core when showing SQL text longer than 8208 bytes. 
 
Repro Steps: 
From Terminal 1: 
 
$ cat ddl1.txt 
create table db2inst1.tab1( 
col_0000000000 int, 
col_0000000001 int, 
    ..(snip).. 
col_0000000407 int, 
col_0000000408 int 
); 
 
$ cat ddl2.txt 
create table db2inst1.tab10( 
col_0000000000 int, 
col_0000000001 int, 
    ..(snip).. 
col_0000000407 int, 
col_0000000408 int 
); 
 
$ ls -lF ddl?.txt 
-rw-r-----    1 db2inst1  dbadm    8210 Apr 04 06:55 ddl1.txt 
<< 8208 bytes except for the last LF character and ';' 
-rw-r-----    1 db2inst1  dbadm    8211 Apr 04 06:14 ddl2.txt 
<< 8209 bytes except for the last LF character and ';' 
 
From Terminal 2, run db2top: 
 
$ db2top -d sample -i 10 
Then type "D" to show dynamic SQL statements. 
 
From Terminal 1, connect to sample and run above 2 statements: 
$ db2 -tf ddl1.txt 
 
In Terminal 2, "create table db2inst1.t1 ..." will be shown. 
Type "L" and enter HashValue(in this case, input 
00000008374788304357592542) to show the statement: 
 
[-]06:38:57,refresh=10secs(0.001)                          SQL 
AIX,part=[1/1],AKIKOBA:P35802 
[d=Y,a=N,e=N,p=ALL] 
[qp=off] 
 
    SQL_Statement              Sql 
Num       Exec        Avg        Cpu        Avg 
    HashValue                  Statement (30 first char.) 
Execution       Time   ExecTime       Time    CpuTime 
    -------------------------- ------------------------------ 
--------- ---------- ---------- ---------- ---------- 
    00000008374788304357592542 create table db2inst1.tab1( co 
1   0.000000   0.000000   0.000000   0.000000 
    00000000006101575056951548 select current CLIENT_APPLNAME 
1   0.005753   0.005753   0.002777   0.002777 
       .... 
 
In this case the statement will be displayed. 
 
However, run ddl2.txt in Terminal 1 and input HashValue for 
it(in this case, 00000009666737530748824015) in Terminal 2, it 
got sigsegv: 
 
    SQL_Statement              Sql 
Num       Exec        Avg        Cpu        Avg 
    HashValue                  Statement (30 first char.) 
Execution       Time   ExecTime       Time    CpuTime 
    -------------------------- ------------------------------ 
--------- ---------- ---------- ---------- ---------- 
    00000008374788304357592542 create table db2inst1.tab1( co 
1   0.000000   0.000000   0.000000   0.000000 
    00000009666737530748824015 create table db2inst1.tab10( c 
1   0.000000   0.000000   0.000000   0.000000 
    00000005429283171301468277 CALL SYSPROC.SYSINSTALLOBJECTS 
1   0.078907   0.078907   0.002037   0.002037 
 
Segmentation fault (core dumped)
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 10.1 Fix Pack 1                       * 
****************************************************************
Local Fix:
Don't show SQL text longer than 8208 bytes.
available fix packs:
DB2 Version 10.1 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
First fixed in DB2 Version 10.1 Fix Pack 1
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
14.06.2012
28.11.2012
28.11.2012
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.1 FixList
10.5.0.1 FixList