title: Oracle Script For Getting Long Active Sessions
body: <p>Is there any script that you could provide for <code>v$session</code>? I seem to be encountering an issue in which my oracle active sessions are filled up. This is when I do a </p>
  
  <pre><code>SELECT * FROM V$SESSION WHERE STATUS = 'ACTIVE'
  </code></pre>
  
  <p>My problem is, I need a script which could determine how long the connection was held and who was holding it? I wonder where I'm getting it. If possible, it would be really nice if I could autodial these sessions. I'd like to know how long they were held since the last command was done. Another thing to note, there is no current statement associated with the SQL sessions I'm seeing.</p>