db2cmd session issue

Pawan Komaram

Ranch Hand

Posts: 91

posted 5 years ago

Hi,

I want to execute set of commands on db2cmd command utility console within the same session from a remote machine. I am trying to do it through psexec command, but it is forcing me to use db2cmd everytime while executing db2 coomands which is causing the new db2cmd session, every command is executed independently so the collected data is not relevant. My rquirement is as follows.

First I want to execute the foloowing two commands and then give some delay from a remote machine db2 reset monitor all
db2 update monitor switches using bufferpool on lock on sort on statement on table on timestamp on uow on

After 30 minutes I want to execute the follwoing three commands to take sanpshots, it should be executed in the same session as previuos commands from a remote machine db2 get snapshot for dynamic sql on ABC >dyna.sql
db2 get snapshot for locks on ABC >locks.sql
db2 reset monitor all