Monday, 23 August 2010

query strings in LOBs

select * from TABLE where dbms_lob.instr(COLUMN, utl_raw.cast_to_raw('TEXT'),1,1) > 0

Thursday, 19 August 2010

iconify & pop windows for long running batch jobs

When I start long running jobs, I lose context and working with something else and start. Then I forget whatever I was doing.

sudo apt-get install xwit

in /usr/bin create 2 files

iconifyw
-------------------
tmpwinid=`env|grep WINDOWID | sed 's/WINDOWID=\([0-9]*\)/\1/'`
xwit -iconify -id $tmpwinid
-------------------

popbw
-------------------
tmpwinid=`env | grep WINDOWID | sed 's/WINDOWID=\([0-9]*\)/\1/'`
xwit -pop -id $tmpwinid
aplay -q /usr/share/sounds/beep-1.wav
-------------------

the wav file has to be found somewhere

chmod a+x popbw
chmod a+x iconifyw


test with

> iconifyw ;sleep 5 ;popbw