ALTER SYSTEM DISCONNECT SESSION doesn't work Oracle 11g. The devs leave sessions connected overnight, sometimes certain cron jobs fail because of that. I am trying to kill all user sessions, but I can't.

I login as:

sqlplus system/[password] as sysdba


I do this to list the sessions:

select sid,serial#,program from gv$session where type='USER' and machine!='this-server';


And the list looks like this:

       SID    SERIAL# PROGRAM




10   7883 toad.exe
11  42365 toad.exe
77  22493 toad.exe


Then I do:

alter system disconnect session '10,7883' immediate;


And is says:

System altered.


But nothing happens. The session is still there. What am I doing wrong?

P.S.: I'm pretty new to Oracle, I only used MySQL before.
If even an ALTER SYSTEM KILL... does not remove the session after a bit, then the only thing you are left with is to kill it on the OS level.  In Linux you can get the command to kill the process as follows:

SELECT 'kill ' || ' -9 ' || p.spid 
FROM v$session s
JOIN v$process p ON s.paddr = p.addr 
WHERE s.sid=:SID_To_Kill;


In Windows you can get the command to kill the thread as follows:

SELECT 'orakill ' || sys_context('USERENV', 'DB_NAME') || ' ' || p.spid 
FROM v$session s 
JOIN v$process p ON s.paddr = p.addr 
WHERE s.sid=:SID_To_Kill;


It might be simpler just to have cron bounce the database before running the jobs.