24 November 2009

Kill all processes - the rough way

On certain occasions, it might be needed to kill several hunderds of processes on a linux machine. Of course you should NOT do this on a production site, but the use of xargs might be handy:

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

With the grep -v you exclude your own putty session.

Sqlplus connect on HP-UX

I had a problem connecting with a script on HP-UX. Somehow it felt like I had seen it earlier....

sqlplus myuser/mypassword@mydb

The HP-UX does not like the @ sign. You'll need to escape it:

sqlplus myuser/mypassword\@mydb

This solved my problem.