home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
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 IC75276 Status: Closed

CALLING REORGCHK_TB_STATS ON AN EMPTY TABLE WITH STATISTICS COLLECTED
RETURNS -1 FOR ALL THE STATISTICS OUTPUTS

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
If a table  is empty but has statistics collected, the 
administrative SQL routine REORGCHK_TB_STATS will return values 
-1 for all the output columns in the result set. 
 
For example, the issue can be reproduces as below: 
 
--create an empty table TEST1 and collect statistics using 
runstats 
db2 "create table db2inst1.TEST1(c1 varchar(10))" 
db2 "runstats on table db2inst1.TEST1" 
 
--use the below query to show the correct statistics for the 
table 
db2 "select 
tabname,type,card,npages,fpages,active_blocks,overflow, 
stats_time from syscat.tables where tabname='TEST1'" 
 
TABNAME 
 
TYPE CARD                 NPAGES               FPAGES 
   ACTIVE_BLOCKS        OVERFLOW             STATS_TIME 
---------------------------------------------------------------- 
---------------------------------------------------------------- 
---- -------------------- -------------------- 
-------------------- -------------------- -------------------- 
-------------------------- 
TEST1 
 
T                       0                    0 
 1                    0                    0 
2011-01-05-00.29.01.217425 
 
  1 record(s) selected. 
 
 
--But the SQL routine SYSPROC.REORGCHK_TB_STATS returns -1 for 
all the statistics columns in the result set. 
 
 db2 "CALL SYSPROC.REORGCHK_TB_STATS('T','DB2INST1.TEST1')" 
 
 
  Result set 1 
  -------------- 
 
  TABLE_SCHEMA 
 
 TABLE_NAME 
 
DATAPARTITIONNAME 
 
CARD                 OVERFLOW             NPAGES 
FPAGES               ACTIVE_BLOCKS        TSIZE 
F1          F2          F3          REORG 
 
---------------------------------------------------------------- 
---------------------------------------------------------------- 
---------------------------------------------------------------- 
---------------------------------------------------------------- 
---------------------------------------------------------------- 
---------------------------------------------------------------- 
-------------------- -------------------- -------------------- 
-------------------- -------------------- -------------------- 
----------- ----------- ----------- ----- 
  DB2INST1 
 
 TEST1 
 
- 
 
                 -1                   -1                   -1 
               -1                   -1                   -1 
    -1          -1          -1 --- 
 
  1 record(s) selected. 
 
  Return Status = 0
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 9.7 Fix Pack 5 or newer               * 
****************************************************************
Local Fix:
available fix packs:
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 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Problem was first fixed in Version 9.7 Fix Pack 5
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
25.03.2011
02.01.2012
02.01.2012
Problem solved at the following versions (IBM BugInfos)
9.7.FP5
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.5 FixList