Skip to content

Instantly share code, notes, and snippets.

@llagerlof
Last active March 26, 2019 13:41
Show Gist options
  • Save llagerlof/1b8648ec495a1a967985cc0515c9e47b to your computer and use it in GitHub Desktop.
Save llagerlof/1b8648ec495a1a967985cc0515c9e47b to your computer and use it in GitHub Desktop.
How to kill oracle connections by session
SELECT * FROM V$SESSION WHERE SCHEMANAME = 'MYSCHEMA' AND MACHINE = 'applicationserver.localdomain' AND STATUS = 'INACTIVE';
ALTER SYSTEM KILL SESSION '87,33311'; -- SID,SERIAL
ALTER SYSTEM DISCONNECT SESSION '87,33311' IMMEDIATE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment