We can find the session information using v$session and v$process
SELECT
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM v$session s
JOIN v$process p ON p.addr = s.paddr
WHERE s.type != 'BACKGROUND'
SID SERIAL# SPID USERNAME PROGRAM
---------- ---------- ------------ ------------------------------ ------------------------------------------- 112 53329 22054 vanita sql*plus
We can kill session using below command
SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';
i.e
SQL> ALTER SYSTEM KILL SESSION '112 ,53329';
SELECT
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM v$session s
JOIN v$process p ON p.addr = s.paddr
WHERE s.type != 'BACKGROUND'
SID SERIAL# SPID USERNAME PROGRAM
---------- ---------- ------------ ------------------------------ ------------------------------------------- 112 53329 22054 vanita sql*plus
We can kill session using below command
SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';
i.e
SQL> ALTER SYSTEM KILL SESSION '112 ,53329';
No comments:
Post a Comment