I am constantly asked how to distinguish the different JDBC connections that come from the middle tier. His an example on how to do this OAS 10.1.3.x.
1. Create a data source as follows which is using the JDBC driver as the factory class (oracle.jdbc.driver.OracleDriver)
2. In order to populate the PROGRAM column you need to set the property as shown below.
3. When the data source is started it will create 5 connections so we can then run the following SQL to see if it worked once the connection pool has been started.
set head on feedback on
set pages 999
set linesize 120
prompt SCOTT sessions
col machine format a25
col username format a15
col username format a8
col program format a25
to_char(logon_time, 'dd-MON-yyyy HH24:MI:SS') "Logon"
where username = 'SCOTT'
The result is as follows which clearly shows that the PROGRAM field has been populated by our mid tier data source: