Sabtu, 17 Desember 2011

Kill Many* Jobs

When I want to shutdown the oracle database.

I must kill many session client who connect to the database and running in background Os...

bash> ps -ef|grep -i local=no
oracle 19027     1  0   Sep 07 ?        0:01 oracleSERVER (LOCAL=NO)
oracle 25918     1  0   Sep 07 ?        0:03 oracleSERVER (LOCAL=NO)
oracle 16403     1  0   Sep 07 ?        0:00 oracleSERVER (LOCAL=NO)
oracle 18858     1  0   Sep 06 ?        0:01 oracleSERVER (LOCAL=NO)
oracle  7836     1  0   Sep 07 ?        0:02 oracleSERVER (LOCAL=NO)
oracle  9021     1  0   Sep 07 ?        0:00 oracleSERVER (LOCAL=NO)

Show this the trick (when Nobody give up..:D)

bash> ps -ef|grep LOCAL|awk '{print $2'}|xargs kill -9