SQLcl no kill command?

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Thu, 21 Nov 2019 15:57:04 -0500
Message-ID: <e1236e9a-d30d-534a-7f3d-8fe07b085b77_at_gmail.com>



One of the nice features of SQLcl 17 was the existence of the kill command which allowed me to murder all sessions belonging to the particular user. SQLcl 19.2 can no longer do that:

SQL> help
For help on a topic type help <topic>
List of Help topics available:

/
_at_
_at__at_

ACCEPT
ALIAS*
APEX*
APPEND
ARCHIVE_LOG
BREAK
BRIDGE*
BTITLE
CD*
CHANGE
CLEAR
CODESCAN*
COLUMN
COMPUTE
CONNECT
COPY
CTAS*
DDL*
DEFINE
DEL
DESCRIBE
DISCONNECT
EDIT
EXECUTE
EXIT
FIND*
FORMAT*
GET
HISTORY*
HOST
INFORMATION*
INPUT
LB*
LIQUIBASE*
LIST
LOAD*
NET*
OERR*
PASSWORD
PAUSE
PRINT
PROMPT
QUIT
REMARK
REPEAT*
RESERVED_WORDS
REST*
RUN
SAVE
SCRIPT*
SET
SETERRORL
SHOW
SHUTDOWN
SODA*
SPOOL
SSHTUNNEL*
START
STARTUP
STORE
TIMING
TNSPING*
TTITLE
UNDEFINE
VARIABLE
VAULT*
WHENEVER
WHICH*
XQUERY
SQL> Kill is no longer listed among the available commands. The command was documented on Kris Rice's blog:

http://krisrice.io/2016-06-22-kill-db-sessions-easy-way-with-sqlcl/

Now, I have to go at it again:

define username=lower('&user');
set trimout on
set trimspool on
set pagesize 0
set echo off
set termout off
spool /tmp/murder.sql
select 'ALTER SYSTEM KILL SESSION '''||sid||','||SERIAL#||''';' from v$session where lower(username)=&username; spool off
_at_/tmp/murder

exit;

And I was already looking forward to the easy way. Also, "_at_" doesn't work unless I set SQLPATH.

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Nov 21 2019 - 21:57:04 CET

Original text of this message