If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to get process id (pid) in DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-25-04, 10:08
ypwong5 ypwong5 is offline
Registered User
 
Join Date: Nov 2004
Posts: 1
How to get process id (pid) in DB2

In Sybase stored procedure, it could use the @@spid to get the user process id. Is there any equivalent method to get it in DB2 store procedure?
Reply With Quote
  #2 (permalink)  
Old 11-26-04, 06:43
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
Not sure which version of DB2 and/or OS you are using but try the statement below:

db2 list applications show detail

One of the result column contains the PID. Keep in mind that, this is not SQL statement but purely DB2 command.

Paul
Reply With Quote
  #3 (permalink)  
Old 11-29-04, 05:25
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,

I use DB2 V8.1 fp6 on Linux. Is "Coordinator pid/thread" column the operating system PID you are talking about? Can I use Linux command "kill PID" to kill the process id?

Thanks,
Grofaty
Reply With Quote
  #4 (permalink)  
Old 11-30-04, 02:11
hooche hooche is offline
Registered User
 
Join Date: Jul 2004
Posts: 25
to kill conection you can use:

db2 force application (a,b,...)
a,b - is values from Appl. Handle column
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On