Link to home
Start Free TrialLog in
Avatar of k_murli_krishna
k_murli_krishnaFlag for India

asked on

v$session

When I use v$session, i am able to see all oracle clients connected by m/c names etc. parameters. But when java clients are connected only jdbcclient shows up in all relevant columns. How can I see the machine or terminal names of java clients connected only via jdbc. Which other views and tables of the 1500+ help me.
ASKER CERTIFIED SOLUTION
Avatar of dbasupport
dbasupport

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dbaora
dbaora

Hi,
You can user the select caluse dbasupport suggested, but
you can also set four lines in your java code in order to log all clients connected:

try {
CallableStatement cs = connection.prepareCall("begin dbms_application_info.set_client_info(?); end;");
cs.setString(1,"ApplicationName - "+InetAddress.getLocalHost().toString());
cs.execute();
cs.close();
} catch(Exception e) {
System.out.println("did not manage to get local host");
}

Then you can use:
select
  client_info "Client Application Info",
  logon_time "Logon Time"
from
  v$session
where
  program like '%JDBC%';

regards,
dbaora.
Avatar of k_murli_krishna

ASKER

I am sorry, dbaora i can give answer to only one. dbasupport's answer which came first solves my problem. Your's could also have but we are using atg dynamo in which we write RQL and not jdbc. thanx a lot to both of you.