Skip to main content

PD_GET_DIAG_HIST table function returns only 10240 record


Technote (FAQ)


Question

Why only 10240 records are returned when using PD_GET_DIAG_HIST table function to monitor the diagnostic data

Answer

This is a current designed behavior of DB2 V10.1. It only fetch the maximum 10240 records when you query using the PD_GET_DIAG_HIST table function.

Alternatively you can break your SQL statements with more predicated to filter out the records.

e.g. Running multiple SELECT statements with 1 day parameter.

db2 "SELECT "TIMESTAMP", SUBSTR(MSG,1, 150) AS MSG, substr(FUNCTION, 1,
30) AS FUNCTION, OBJNAME_QUALIFIER|| '.' || OBJNAME AS OBJEKT,
EVENTDESC, FACILITY, RECTYPE, IMPACT FROM TABLE (PD_GET_DIAG_HIST(
'ALL', 'ALL', '', timestamp(CHAR(current date - 1 day) ||
'-00.00.00.000000'), CAST (NULL AS TIMESTAMP) ) ) AS T WHERE
ucase(function) like '%REORG%' ORDER BY "TIMESTAMP""


Related information

PD_GET_DIAG_HIST table function

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

DB2 for Linux, UNIX and Windows


Software version:
10.1


Operating system(s):
AIX, Linux, Windows


Software edition:
Enterprise Server


Reference #:
1613180


Modified date:
2012-10-26

Translate my page

Content navigation