I am no expert on DB2 - just a guess:
I think this is related to the db2 CLP contains two processes. The front
end process db2.exe (aka the CLP) and the backend process db2bp.exe (which
actually execute the command on behalf of the user and return to the user).
When the first time your start the command, DB server will start a backend
processs to handle all your commands - this will take a little bit time for
the startup and therefore you have time to "grep" your front end process
which contain the whole command.
After the first CLP command, the back end process will stay for the same
user (backend process know by the parent PID who send the command and
therefore know your process ID next time you send in another command). I
guess the CLP simply send the command to it's own backend process (of course
it knows there is a backend process already there) and wait for the result
with the CLP in wait mode.
When you use the TERMINATE command, CLP will tell the backend process to
shut down and the user session quit the connection.
So you start the whole thing all over again.
------
Just a two cent guess.
"Erik Hendrix" <he**********@hotmail.com> wrote in message
news:1113870666.1f1b4ecf01f4c48a89ff5b871a322907@t eranews...
Hi,
When I run a DB2 command:
i.e.: db2 list tablespaces show detail
and while this is running do: ps -ef | grep "db2 "
then I can see in the output the db2 command as: db2 list tablespaces show
detail
however, when I then rerun the command I see in the PS output: db2
and not the "list tablespaces show detail".
If I do a db2 terminate and then try again I see the full command again.
Does anyone know why this is and how to fix this so that I can see the
full DB2 command each and every time without having to issue a db2 terminate
first?
Thanks