Below is the query to find the active sessions and you can use its output to disconnect the sessions.Just take the total output and run against database to disconnect user sessions.
SELECT 'Alter System Disconnect Session '||''''||SID||
','||serial#||''''|| ' Immediate;'
FROM v$session
WHERE USERNAME IS NOT NULL
AND TYPE='USER'
----------------------------------------------------------------
Alter System Disconnect Session '15,24571' Immediate;
Alter System Disconnect Session '36,3416' Immediate;
Alter System Disconnect Session '39,5152' Immediate;
SELECT 'Alter System Disconnect Session '||''''||SID||
','||serial#||''''|| ' Immediate;'
FROM v$session
WHERE USERNAME IS NOT NULL
AND TYPE='USER'
----------------------------------------------------------------
Alter System Disconnect Session '15,24571' Immediate;
Alter System Disconnect Session '36,3416' Immediate;
Alter System Disconnect Session '39,5152' Immediate;
No comments:
Post a Comment