IBM Support

What does ”environment” and “section data” mean in "db2pd -dynamic” command output mean ?

Technical Blog Post


Abstract

What does ”environment” and “section data” mean in "db2pd -dynamic” command output mean ?

Body


Recently a customer wanted some help in interpreting the output of "db2pd -dynamic” command. Providing the details in this blog for everyone to understand and use.


1. In “db2pd -dynamic” what does “environment" mean in NumEnv, EnvID etc ?
Ans : The environment means the environment in which a given SQL is supposed to run. Let me use an example to explain :

Suppose you have 2 applications :

Eg 1 :

 Application 1 : Wants to run the SQL in UR mode

Application 2 : Wants to run same SQL but in CS mode

Eg 2 :

Application 1 : SQL wants the result as one row for each fetch

Application 2 : SQL wants block result moved to client (faster)

So in both above examples, the SQL is same but has different isolations in e.g. 1 and different way of results in e.g. 2 so we will have 2 different environments in both cases.

So as you can see, the environment is based on the session settings, variables, options in SQL, command options etc. So if environment is same for 2 same SQL’s then they both are run under same environment.

 

2. In “db2pd dynamic” output, we see “Sect Size” which is the length of section data, what does "section data" mean ?
 Ans : This output is mainly available to help db2 support to help in case if some deeper analysis is required.

“Section data” contains the SQL compilation result. When we have the SQL compilation result we store it in “section data” (in shared memory) and we store the size of this result in “Sect Size” output.

 

[{"Business Unit":{"code":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11140292