Causa: Si sta cercando di killare una sessione che non è una sessione utente tramite il comando:
ALTER SYSTEM KILL SESSION
Azione: Riprovare con una sessione utente valida, ad esempio si può utilizzare la seguente query per costruire dinamicamente lo statement:
SELECT s.*,
p.spid,
s.username,
s.program,
'ALTER SYSTEM KILL SESSION ''' || s.sid || ',' || s.serial# || ''' IMMEDIATE;' as session_id
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND'
AND s.username = 'USERNAME';
ORA-00029: session is not a user session
Cause: The session ID specified in an ALTER SYSTEM KILL SESSION command
was not a user session (for example, recursive, etc.).
Action: Retry with a user session ID.