When testing a query for a db2 custom checkpoint it is not returning a dialog with data
search cancel

When testing a query for a db2 custom checkpoint it is not returning a dialog with data

book

Article ID: 265585

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

I have created a custom checkpoint in the db2 probe, but when testing my query it doesn't return anything in the probe.

Environment

Release : 20.4
Component: db2 probe

Resolution

When creating a custom checkpoint you need to make sure that your query uses the reference point of 'as column_name' when using things like count, sum, etc. An example would be:

    SELECT MEMBER, SUM(LOCK_WAIT_TIME_GLOBAL) FROM TABLE(MON_GET_TABLE('','',-2)) GROUP BY MEMBER;

It will return data in db2's Data Studio, but it will not return data in the probe Test function of the query tab of the checkpoint dialog. We need 'as column_name' in order to continue with the checkpoint creation.

Now if I add an 'as column_name' identifier, it will display the dialog:

    SELECT MEMBER, SUM(LOCK_WAIT_TIME_GLOBAL) AS LOCK_WAIT_TIME FROM TABLE(MON_GET_TABLE('','',-2)) GROUP BY MEMBER;