For some reason Oracle JDBC driver (thin) does not support client info so it is not possible to set v$session.program. I struggled for good half hour how to set v$session.program to Oracle 11g using BoneCP (version 0.8.0.RELEASE) connection pool.
Here is what worked for me:
BoneCPDataSource dataSource = new BoneCPDataSource();
Properties clientInfoProperties = new Properties();
clientInfoProperties.put("v$session.program", "SomeProgramNamePassedToOracle");
dataSource.setDriverProperties(clientInfoProperties);
and now if you do
select program from v$session;
in sqlplus you will be able to identify your session easily.
enjoy
No comments:
Post a Comment