Search This Blog

Tuesday, December 20, 2011

kill session

os level
---------
ps -ef grep databasename
kill -9 processid
kill only sessions which (LOCAL=NO)

database level
-----------------
select sid, serial# from v$session;
alter system kill session 'sid,serial#';

You can get the SID from OEM grid control (performance page). Once you know the SID, you can issue the below command in order to find out the session id,

SQL> SELECT SID, SERIAL#, USERNAME FROM V$SESSION where SID='797';

SID SERIAL# USERNAME
---------- ---------- ------------------------------
797 34605 username

No comments:

Post a Comment