How To Find The Database Session Associated with a JVM Thread (Doc ID 1485912.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version 10.2.0.1 and later
Information in this document applies to any platform.

Goal

In the world of enterprise java applications, we are very often faced with the challenge of determining the
database session associated with a particular JVM thread. For example, we may need this information to understand
why a particular JVM thread is unable to complete a database transaction and leads to a JVM hang or deadlock. Unfortunately, there is no
direct way of finding this out from data dictionary views like V$Session because they do not hold the JVM thread
information. 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms