Created
June 15, 2013 12:59
-
-
Save mjbommar/5788046 to your computer and use it in GitHub Desktop.
Generate a script to kill (IMMEDIATE) all sqlplus sessions from a given host.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'ALTER SYSTEM KILL SESSION ''' || sid || ',' || serial# || ',@' || inst_id || ''' IMMEDIATE;' | |
FROM gv$session | |
WHERE module = 'SQL*Plus' | |
AND machine = 'host.company.com'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment