Immediate is required if you want to kill the session immediately and don’t want Oracle to complete the current operation to complete.
RAC database Syntax –
SQL> ALTER SYSTEM KILL SESSION '<sid>,<serial#>,@<inst_id>' <immediate>;
Since RAC database usually have more than one instance, we need to tell the system I want to kill the session from that specific instance using inst_id
If you don’t pass inst_id on RAC system, then you will end up killing a session on which you connected with privileged user. ( Session may exists or may not exists but still better to give the inst_id )
alter system disconnect session
There is another command which can be used to kill Oracle session
alter system disconnect session 'SID,SERIAL#' POST_TRANSACTION|IMMEDIATE;
Unlike kill session command, this command kills the dedicated server process (or virtual circuit when using Shared Sever), which is equivalent to killing the server process from the operating system. We can use POST_TRANSACTION in case, we need to wait for the transaction to commit or rollback. We will use immediate,if we want to immediately kill the session.
Immediate is required if you want to kill the session immediately and don’t want Oracle to complete the current operation to complete.
RAC database Syntax –
SQL> ALTER SYSTEM KILL SESSION '<sid>,<serial#>,@<inst_id>' <immediate>;
Since RAC database usually have more than one instance, we need to tell the system I want to kill the session from that specific instance using inst_id
If you don’t pass inst_id on RAC system, then you will end up killing a session on which you connected with privileged user. ( Session may exists or may not exists but still better to give the inst_id )
alter system disconnect session
There is another command which can be used to kill Oracle session
alter system disconnect session 'SID,SERIAL#' POST_TRANSACTION|IMMEDIATE;
Unlike kill session command, this command kills the dedicated server process (or virtual circuit when using Shared Sever), which is equivalent to killing the server process from the operating system. We can use POST_TRANSACTION in case, we need to wait for the transaction to commit or rollback. We will use immediate,if we want to immediately kill the session.