Sometimes application developers or client offers you to kill any session or sessions group like SQL Net Client, or JDBC Client sessions or RMAN sessions.
You need to find session SID and SERIAL# with below script.
select s.SID,s.SERIAL#,S.USERNAME from v$session s where s.sid=63;
You can kill any session with its SID and SERIAL# number like below.
alter system kill session '63,1963';
Customer offers you to kill sessions group like SQL Net Client, or JDBC Client sessions or RMAN sessions. You can generate kill session script like below. You can change event to kill any other event group sessions.
SELECT 'kill -9 ' || p.spid, s.username, 'alter system kill session ''' || SID || ',' || s.serial# || ''';' FROM v$session s, v$process p WHERE s.paddr = p.addr(+) AND s.SID IN (SELECT SID FROM v$session_wait WHERE event LIKE 'SQL*Net message from client%') and s.username ='DEVECI' and s.saddr not in ( select SES_ADDR from v$transaction );
You can read other Kill Session Scripts in Oracle.
Do you want to learn Oracle Database Performance Tuning detailed, then read the following articles.
1,412 views last month, 2 views today