I have installed DB2 Express C 9.7.4 edition.
I am establishing DB2 Connection using JAVA language.
But I have to still provide user name and password of my windows Login account for establishing connection…
Is it necessary to mention it ?
Is there any way out that can establish connection without specifying user name/password as during installation we have skipped the page.
Thanks in advance…
When an application runs on the same machine as the database server, DB2 will make the assumption that the userID that started the application has already been authenticated by the operating system – so no additional authentication is necessary. This is referred to as impicit authentication.
So, without making changes to the default DB2 database configuration, you can do this if the following conditions are met:
The java application must be running on the same machine as the DB2 database
Your application must use a JDBC Type 2 connection (JDBC URL should look like
jdbc:db2:database– notjdbc://localhost:50000/database).The userID executing the Java application has authority to connect to the DB2 database, query the appropriate tables, etc.
It is possible to allow implicit authentication for applications running on machines other than the database server, but this requries setting up trusted contexts or opening a big security hole (changing the
AUTHENTICATIONdatabase configuration parameter).