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 > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > How i can get the pid of a db2 connection via Unix hell scripts ?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-21-09, 15:24
TheBoss2009 TheBoss2009 is offline
Registered User
 
Join Date: Jan 2009
Posts: 1
How i can get the pid of a db2 connection via Unix hell scripts ?

Hi everyone

I have the follow shell script to connect to a DB2 database .


#!/bin/sh
db2 "connect to dbname user dbuser "


the db2 sentence generate a connection to DB2. I need know who i can get the PID of these connection on the same shell scripts.

I try whit $! but show nothing ..

#!/bin/sh
db2 "connect to dbname user dbuser "
echo $!


Thankyou
Reply With Quote
Reply

Thread Tools
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