Hi. I'm running a small custom Java utility on an AIX server connecting to a DB2 database. DB2 allows for implicit connections, which means that through the UNIX command line I can connect to the DB without providing a password. It knows that since I'm authenicated on the server, I must also be authenicated on the DB (assuming I have an account created at the DB level).
Is there a way to do this in Java? I want to connect to the same DB2 database in my Java utility without having to provide a password. Can this be done?
NOTE: I am calling the Java app/class from a KSH script.
I'm not sure if this is gonna work but you could try using the "app" (type 2) driver (COM.ibm.db2.jdbc.app.DB2Driver). You'll need to catalog your database locally and specify the jdbc url as "jdbc:db2:YOURDB".