I need to Terminate(kill ) All Sessions inside Oracle Db v$session
where the status
is not Active
To list active and Inactive Sessions i used this statement:
SELECT sid, serial#, status FROM v$session;
I need a Statement to terminate Sessions where status != Active
There is Only one way to Terminate a session and it is by
'sid,serial#'
this is a Statement for example :
So we need to go through a cycle to Perform this Statement for All
'sid,serial#'
but Only when status!=active: This Code Sould Solve this Problem :