-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Author       : Sameer S Choudhari
-- Description  : Kill all oracle sessions for a user
-- Call Syntax  : @kill_all_session.sql
-- Last Modified: 18/05/2016
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SET LINES 220 PAGES 49999
COLUMN kill_user_sessions FORMAT a60
SELECT 'alter system kill session ''' ||sid ||',' ||serial# ||''' immediate ;' kill_user_sessions
FROM v$session WHERE username='&usernmae';