I will explain better.
I have two clp windows.
In first window no monitor switch is turned on. Here I connect to db and
execute a query 5 times.
In second window I connect to db and update monitor switches for buffer
pool and statement only.
Then connect to db and execute the following script snap.cmd.
-----
:BEGIN
db2 -z snapdyn_sql.out -tnx "select
SNAPSHOT_TIMESTAMP,NUM_EXECUTIONS,NUM_COMPILATIONS ,PREP_TIME_WORST,PREP_TIME_BEST,ROWS_READ,ROWS_WRI TTEN,POOL_DATA_L_READS,POOL_DATA_P_READS,POOL_TEMP_DAT A_L_READS,POOL_TEMP_DATA_P_READS,TOTAL_EXEC_TIME,TOTAL_EXEC _TIME_MS,TOTAL_USR_CPU_TIME,TOTAL_USR_CPU_TIME_MS,TOTAL_SY S_CPU_TIME,TOTAL_SYS_CPU_TIME_MS
from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT like 'select id from t_emp order
by id'"
ping 127.0.0.1 -n 1 -w 1000 > nul
GOTO BEGIN
------

I first execute the script in second window and then execute the sql 5
times in first window.
The output file snapdyn_sql.out captures the number of executions correctly
but does not give me buffer pool reads and writes.
I connect to db as the same user only in both the clp windows.

Please let me know why it is not reflecting? I monitor only in second
window where I have updated the switches as appropriate; then why it should
not work with the CLP level setting.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.