DB2 Stored Procedure for Calculating Application Statistics

We have provided a stored procedure that you can run to calculate statistics about your Leap applications.

To run the procedure:

  1. Download the appDataStatsByRecordCount.sql file
  2. Launch a DB2 command window
  3. Execute the following commands:

db2 -f "C:\Users\IBM_ADMIN\Documents\FEB\Databases etc\appDataStatsByRecordCount.sql" -td@

db2 -r "C:\Users\IBM_ADMIN\Documents\FEB\Databases etc\appDataStatsByRecordCount.out" call appDataStatsByRecordCount()

Output Sample

A sample of the output generated by the stored procedure is provided below. 

Detail on some of the columns:

CREATED = when app was created

UPDATED = when app (design) was last updated

OWNER_EMAIL = the original creator of the app

MAX_RECORD_CREATED = timestamp of the most recently created record

MAX_RECORD_UPDATED = timestamp of the most recently updated record

ATTACHMENTS_SIZE = total size of attachments in megabytes


APP_ID

TITLE

FORM_TITLE

CREATED

UPDATED

STATUS

OWNER_EMAIL

RECORD_COUNT

MAX_RECORD_CREATED

MAX_RECORD_UPDATED

ATTACHMENT_COUNT

ATTACHMENTS_SIZE

TABLENAME

7ba0dd76-4448-4799-8bd6-5fa8a8f1ea0e

test email by API call

F_Form1

6/6/19 23:04

6/6/19 23:20

published

user@example.com

15

6/21/19 20:27

6/21/19 20:27

14

143

1UUUDGPJM991H8EK5OLO20E46R

f590b7fb-542b-4e42-8a68-4f57f9c6b74f

test JSON count

F_Form1

4/10/19 16:56

4/10/19 16:56

published

user@example.com

8

4/10/19 19:25

4/10/19 19:25

5

5

4LFT4QEL1K9DKO2I96O2JPBD3D

87e9de1d-a9b4-43e8-8d30-fb06538b4eae

flow state

F_Form1

1/29/19 18:44

1/29/19 18:56

published

user@example.com

5

1/29/19 18:57

1/29/19 18:57

0

NULL

FCPS3TCD855O6FT2LLIU9DGA

e219700b-a675-4248-8e91-c995dba44fe6

test dynamic roles 2

F_Form1

5/22/19 0:55

5/22/19 0:55

published

user@example.com

2

5/22/19 4:14

5/22/19 4:14

0

NULL

6U0QL6958L8TPO39UDO6DCJN0V

7411f1d5-926c-4e4b-8e9b-6ff1d0ca4ab8

test string

F_Form1

1/14/19 19:31

1/14/19 19:31

published

user@example.com

1

1/14/19 19:32

1/14/19 19:32

0

NULL

6664B4H3MR9OT8N38AOR1RON6D

a207ff62-c7a4-4cc1-831e-99edce90d934

test openliberty and db2

F_Form1

6/24/19 18:57

6/24/19 18:57

published

user@example.com

1

6/24/19 18:57

6/24/19 18:57

0

NULL

KFPNTEE3T9GC8FCG0USNOQ6K0

b37c3d05-6d11-43b9-8af3-2dc99b505399

no dynamic roles

F_Form1

5/22/19 0:21

5/22/19 0:21

published

user@example.com

1

5/22/19 0:36

5/22/19 0:36

0

NULL

7L98P5F5J9GG8GM52OR272PA1

baa5ac6b-087d-415b-8256-ad6dc7ac8796

Benefits Enrollment Test

F_Form1

7/24/18 4:53

7/24/18 4:53

published

user@example.com

1

7/24/18 4:53

7/24/18 4:53

0

NULL

5U6LV9131L8VIOPONFQ9UTEB26

c3054de8-5c28-401f-880c-78ce6b1c379e

test dynamic roles

F_Form1

5/21/19 23:53

5/22/19 0:14

published

user@example.com

1

5/22/19 0:14

5/22/19 0:14

0

NULL

39D110Q18N8VH8J5I91CSGEIDB

c6805ced-9988-4f8f-861c-31d4808ef2cf

test app upgrade failure

F_Form1

12/11/18 22:41

12/11/18 22:57

published

user@example.com

1

12/11/18 22:56

12/11/18 22:56

0

NULL

3SGUBDUHHL8NF8FK82TKK4FFRG

0bc9d327-c66e-4207-8f71-55b6ff34cd40

zxvc

F_Form1

12/12/18 23:48

12/12/18 23:48

published

user@example.com

0

NULL

NULL

0

NULL

1UNPM4HV319LTOILOFT83H1B49

31fcc730-ecab-45db-8367-06ef516177ee

sdfg

F_Form1

7/11/18 1:11

7/11/18 1:11

publish-stopped

user@example.com

0

NULL

NULL

0

NULL

4EHV9JI4089BI8HNEJG9AG80U6

3274aa92-1444-4182-82aa-341541b8442b

vxv

F_Form1

7/11/18 1:12

7/11/18 1:12

published

user@example.com

0

NULL

NULL

0

NULL

Q17GTGNF98O690EOHP9HG6EFT

36fb9134-2fcf-43dd-8686-d657e4fc7ff6

App 123

F_MainForm

5/22/19 21:21

5/22/19 23:15

oos-published

user@example.com

0

NULL

NULL

0

NULL

3QLK3SI12G95FOJNSPS9M2QL3G