ORA-00026
Tried to kill a session in a database, but it failed with ORA-00026.
Case 1
SQL> ALTER SYSTEM KILL SESSION ('391, 9220');
ALTER SYSTEM KILL SESSION ('391, 9220')
*
ERROR at line 1:
ORA-00026: missing or invalid session ID
Case 2
SQL> ALTER SYSTEM KILL SESSION '1221:4334:@2';
ALTER SYSTEM KILL SESSION '1221:4334:@2'
*
ERROR at line 1:
ORA-00026: missing or invalid session ID
ORA-00026 means that the syntax of session information you provided in ALTER SYSTEM KILL SESSION statement is incorrect.
Solutions
In the first case, you don't need to use parenthesis to enclose the session information. In the second case, you should use commas to separate SID, SERIAL# and @INST_ID, don't use semicolons.
You should use correct syntax of ALTER SYSTEM KILL SESSION before going further.
Case 1
Here we remove parenthesis.
SQL> ALTER SYSTEM KILL SESSION '391, 9220';
System altered.
Case 2
We use commas instead of semicolon.
SQL> ALTER SYSTEM KILL SESSION '1221, 4334, @2';;
System altered.
Problems solved.