I am trying the below script to kill all active and inactive oracle sessions for user at once but it doesn\'t work. The script executes successfully but does not kill sessions f
For Oracle 11g this may not work as you may receive an error like below
Error report:
SQL Error: ORA-00026: missing or invalid session ID
00026. 00000 - "missing or invalid session ID"
*Cause: Missing or invalid session ID string for ALTER SYSTEM KILL SESSION.
*Action: Retry with a valid session ID.
To rectify this, use below code to identify the sessions
SQL> select inst_id,sid,serial# from gv$session
or v$session
NOTE : v$session do not have inst_id field
and Kill them using
alter system kill session 'sid,serial,@inst_id' IMMEDIATE;