By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,569 Members | 1,422 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,569 IT Pros & Developers. It's quick & easy.

db2 CLP and PS output on AIX

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
cmc
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

Nov 12 '05 #2

P: n/a
I would go with this if not for the following:

1) We can see it every time on Solaris.
2) Although the back end process indeed exists, the front-end process also
still exists. It is the fron-end proces s which thus would normally show the
command.

Thanks.

"cmc" <cm*****@yahoo.com> wrote in message
news:WE******************@news20.bellglobal.com...
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


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.