-
Here is what our developer uses to connect to the database:
----------------------------------------------------------
s1 = "jdbcracle:" + args[3] + ":@" +
"(description=(address=(host=" + host+
")(protocol=tcp)(port=" + port+
"))(connect_data=(sid=" + sid +
")))";
}
DriverManager.registerDriver(
new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection( s1,
"scott",
"tiger");
-----------------------------------------------------------
BUT, in v$session I only see the machine as "jdbcclient", and program as "JDBC Client 1.0" !
Like other apps when they connect to the DB directly (not thru JDBC) I want to be able to see where they are connecting from and what program they are running.
How is this possible ?
Does any one know additional properties that can be passed thru DriverManager.getConnection when making the connection.
Thanks in advance.
-
Check the listener.log file in $ORACLE_HOME/netowork/log
There you can find the host which is making the jdbc connection to the database. Take the IP address and do an nslookup, that will give you the name of the server that is making that connection.
Sam
Thanx
Sam
Life is a journey, not a destination!
-
How about a way without going to the OS ?
Does anyone know of any DriverManager.getConnection properties ?
-
You can use lsof utlity on UNIX platforms.
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof
-
Don't have permissions to open the folder, since it is a ftp site; can you cut n paste the few lines, thanks.
-
This can help you to find all open sockets on the machine and for particular PID,port ...
Try use this site
ftp://ftp.cerias.purdue.edu/pub/tool.../sysutils/lsof
-
Once again zdenekm, I did not have permission to open the folder at the ftp site !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|