fbpx

How to Kill a Session in Oracle RAC Database

burning tree

If you need to kill a session in Oracle RAC database then first you need to know the SID, Serial# and the instance where the session is running.

You can get that info depending on what you are given, let’s see some options.

If you know the SID, then you can get the other values with this query

select sid,serial#,inst_id 
from gv$session 
where sid='1195';

Now let’s suppose that you have the serial# then use this query

select sid,serial#,inst_id, sql_id 
from gv$session 
where serial#='15148';

In case you have the username, use this query, you could add the logon_time to the query

select sid,serial#,inst_id 
from gv$session 
where USERNAME='username';
Continue reading “How to Kill a Session in Oracle RAC Database”