Query to list DB Sessions:
Login as sys user.
SELECT s.inst_id,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND';
Kill DB Session:
SQL>ALTER SYSTEM KILL SESSION 'sid,serial#';
No comments:
Post a Comment