• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » How to find the database session for JVM PID

How to find the database session for JVM PID

November 5, 2012 by techgoeasy Leave a Comment

To find total number of open database connections for a given JVM PIDSELECT s.process, Count(*) all_count FROM   gv$session s WHERE s.process IN () GROUP BY  s.process

To find number of database connections per JVM that were inactive for longer then 60 minutes

SELECT s.process, Count(*) olderConnection_count FROM   gv$session s WHERE  s.process IN ()
and  s.last_call_et>=(60*60) and s.status=’INACTIVE’ GROUP BY  s.process

To find the modules responsible to JDBC connections for a process id

SELECT Count(*), process,machine, program, MODULE FROM v$session s
WHERE s.process IN (‘&id’)GROUP BY process,machine, program, MODULE ORDER BY process,machine, program, MODULE;

column module heading “Module Name” format a48;
column machine heading “Machine Name” format a15;
column process heading “Process ID” format a10;
column inst_id heading “Instance ID” format 99;
prompt
prompt Connection Usage Per Module and process
select to_char(sysdate, ‘dd-mon-yyyy hh24:mi’) Time from dual
/
prompt ~~~~
select count(*), machine, process, module from v$session
where program like ‘JDBC%’ group by machine, process, module order by 1 asc
/

Filed Under: Oracle, Oracle Ebuisness Suite Tagged With: How to find the database session for JVM PID, JDBC connection, PID

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • Oracle tkprof utility
  • What is Skew in Database?
  • how to find file based on size in linux
  • SQL trace, 10046 event in Oracle
  • How to use sed replace string in file

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us