Hello all,
there are two procedures to get the reorgchk statistics for tables and
indexes.
I would like to have the result of those stored in a table.
Has one of you a hint for me how I could get this?
Is there a global temporary table I could read after calling the
procedure?
(Knut, is it possible?)
Many thanks
Stefan
Make DB2 administrative APIs available through SQL
http://www-128.ibm.com/developerwork...lze/index.html
db2 => call sysproc.reorgchk_ix_stats('t','sapr3.t000')
Result set 1
--------------
TABLE_SCHEMA
TABLE_NAME
INDEX_SCHEMA INDEX_NAME
CARD NLEAF NUM_EMPTY_LEAFS NLEVEL
S ISIZE NUMRIDS_DELETED FULLKEYCARD F4
F5 F6 F7 F8
REORG
----------------------------------------------------------------------------------------------------------------------
----------
-------------------------------------------------------------------------------------------------------------
------------------- --------------------------------
-------------------- ----------- ----------- --------------- ------
----- -------------------- -------------------- --------------------
----------- ----------- ----------- ----------- ---
-------- -----
SAPR3
T000
SAPR3 T000~0
3 1 0
1 3 0 3
100 -1 -1 0
0 -----
1 record(s) selected.
Return Status = 0
db2 => call sysproc.reorgchk_tb_stats('t','sapr3.t000')
Result set 1
--------------
TABLE_SCHEMA
TABLE_NAME
CARD OVERFLOW NPAGES FPAGES
ACTIVE_BLOCKS TSIZE F1
F2 F3 REORG
----------------------------------------------------------------------------------------------------------------------
----------
-------------------------------------------------------------------------------------------------------------
------------------- ----------- ----------- ----------- -----------
-------------------- -------------------- ----------
- ----------- ----------- -----
SAPR3
T000
3 0 1 1
-1 270
0 -1 100 ---
1 record(s) selected.
db2 => describe call sysproc.reorgchk_tb_stats('t','sapr3.t000')
SQLDA Information
sqldaid : SQLDA sqldabc: 1136 sqln: 20 sqld: 0
Column Information
sqltype sqllen sqlname.data
sqlname.length
-------------------- ------ ------------------------------
--------------
(empty ???)