How To Kill Session In Oracle Using Command In Sqlplus?

In various critical situations Oracle DBA has to decideabnormally with murdering background processes.
to kill existing session or kill the background process ofIn above critical situation we need to kill or terminate or
Oracle. At this moment remote Oracle DBA shouldmurder some session or process using command line
need to terminate session/process called as murder ofor GUI utility like OEM, TOAD etc. But command line is
session.  more easy and helpful to solve such critical situation in
Which situation kill session or process needed:  remote DBA support services.
Then question is raised that in under which type ofHow to kill session using command line of Oracle:  
situation remote dba should need to kill session andUsing SQL*Plus (kill session with alter system
process. We are explaining those situations andcommand): It is very simple way to kill session using
incidences of database.Some critical situation OracleSQL command. Just check serial no and sid (system
DBA should need to take decision to ternminateidentifier) from v$session view as follows and use
session.  "alter system kill session" with sid and serial#
Kill session needed under following typical and criticalcommand.   SQL>select sid,serial# from v$session
circumstances.  where machine='GPTWORKGROUP';
1. When blocking lock occurs and other sessions areSID SERIAL#
waiting to acquire a lock on same object. But blocker9 171
session doesn't end the transaction. At this moment1 row selected
Remote oracle dba should need to identify blockingSQL> alter system kill session '9,171';
session and terminate it for clearing resources forSystem altered.
other sessions.OR
2. When maximum connections reached error occurs.SQL>alter system kill session '9,171' immediate;
No room available for any new connection or session.System altered.
At this time Remote Oracle DBA should need to killAnd terminated user session will get message in
some of idle processes from Oracle database.sqlplus that "your session has been killed". We can get
3. When database found in hang status and shutdownoutput of status as "killed" from v$session for
abort command also doesn't work, at same timeterminated session.
Remote Dba should need to terminate instance