The KILL SESSION command does not actually end the session. He just asks the session to kill himself. In some situations, such as waiting for a response from a remote database or rollback transactions, the session will not exit immediately and will wait for the current operation to complete. In these cases, the session will have the status โ marked for destruction โ. Then he will be killed as soon as possible.
Check the status to confirm:
SELECT sid, serial
You can also use the IMMEDIATE clause:
ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
The IMMEDIATE clause does not affect the work performed by the command, but immediately returns control back to the current session, rather than waiting for confirmation of destruction. Take a look at killing Oracle sessions .
Update If you want to kill all sessions, you can simply prepare a small script.
SELECT 'ALTER SYSTEM KILL SESSION '''||sid||','||serial
Sign the above into a .sql file and execute it.
source share