Oracle – JDBC v$session osuser/program issue

When an java app connects to oracle depending on the driver such as osuser, program in v$session will not be set (i.e. will be NULL) in Oracle. This issue is fixed in oracle JDBC driver which can be downloaded from the following URL (

Another workaround this issue is to pass the value in java.util.Properties when establishing the connection.
(This workaround fix depends on the driver being used so it may not work in all situations).
java.util.Properties props = new java.util.Properties();

props.put(“v$session.program”, “testprogram”);
Connection conn = DriverManager.getConnection(“jdbc:oracle:thin:scott/tiger@host:1521:TESTSID”, props);

In a separate window, during the execution of the program one can see the value of osuser and program is set.
SELECT osuser, program from V$session
————————- —————————
Mike testprogram