Why are the sessions with Oracle not closed even after the query execution is over in TIBCO Data Virtualization?

Why are the sessions with Oracle not closed even after the query execution is over in TIBCO Data Virtualization?

book

Article ID: KB0070182

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions.

Description

The sessions can be monitored in Oracle as well as in TIBCO Data Virtualization. And the number of active sessions should match in both the cases.
Use the below command in Oracle:
SELECT sid, serial#, username, status FROM v$session WHERE status = 'ACTIVE';
And in TDV, use this:
SELECT * FROM /services/databases/system/SYS_SESSIONS ss WHERE ss.SESSION_TYPE = 'JDBC';
This query will list all JDBC active sessions but add another filter for just Oracle sessions.

But it could be that even after the query execution is completed, it still shows active sessions in Oracle but not in TDV.
This means that the older completed sessions are still not closed.

Issue/Introduction

This article mentions a possible reason why the Oracle sessions are not closing in TIBCO Data Virtulization.

Environment

All supported environments.

Resolution

This issue is not from TIBCO Data Virtualization and has something to do with Oracle not closing the sessions correctly.
Technically, TDV's job is only to send out the information to Oracle that the session has been closed and Oracle is responsible for handling them.
This behavior could be either because of the Oracle JDBC driver or Oracle DB itself.

After going through a thread on this issue, it does seem that old sessions not closing is an issue that the Oracle team is trying to fix. It is also possible that the issue might have been fixed for the latest JDBC drivers like ojdbc11.

The thread also mentions a workaround "idle connection eviction". This is something you could try and see if it closes the older sessions. The parameter "MinEvictableIdleTimeMillis" (default value 3000) can also be checked in Oracle. This is the minimum time (milliseconds) that a database connection can sit idle before it becomes a candidate for eviction from the pool.

Additional Information

Refer: https://forum.inductiveautomation.com/t/oracle-jdbc-not-closing-sessions/27064/6