Thursday, March 26, 2009

pl/sql cursor syntax

WHENEVER SQLERROR EXIT 2 ROLLBACK;
DECLARE
id NUMBER;
CURSOR c IS
SELECT ID FROM TAB;
BEGIN
OPEN c;
LOOP
FETCH c INTO id;

EXIT WHEN c%NOTFOUND;
END LOOP;
CLOSE c;

COMMIT;
END;
/

EXIT 1;

Monday, March 23, 2009

free cached memory

first: there is no need (not true... my oracle instance is broken and it doesn't work if i don't free cached memory... don't reuse, redo)
second: this gentoo thread explain whet it is... click here

then

echo 1 > /proc/sys/vm/drop_caches

Monday, March 2, 2009

how to record streams

mplayer -dumpstream -dumpfile stream.mp3 mms://66.186.34.172:8971/RadioRock_audio