No it does not work.

The strange thing is that it worked before on a different systems.

BTW this is oracle 10.2.0.2.0

Any more ideas ...
I run it from the script

This is the way I get sid&serial num


select a.username,a.sid ,a.serial#
into :v_username,:v_sid,:v_serial_num
from v/$session a, v/$sqlarea b, v/$process c
where a.sql_address=b.address
and c.ADDR=a.PADDR
and c.SPID='$PID';