(Thanks to Bernd, Ian, Phil last time for their detailed answers last
time) Now I try to call JDBC driver
without giving the username and password as they suggested. I am using
DB2 jdbc on SunOS 5.8 with db2 version 7.2.0. When I am using the
type2 network driver (COM.ibm.db2.jdbc.net.DB2Driver) with username
and password, everything is fine.
However, when I use the application driver:
(COM.ibm.db2.jdbc.app.DB2Driver), and call
"DriverManger.getConnection(String url)" I get the following:
java.sql.SQLException: java.lang.UnsatisfiedLinkError: /fsys/.software/
local/db2-7.2/distribution/V7.1/lib/libdb2jdbc.so: Can't load Sparc 32-
bit .so on a Sparc v9 64-bit platform
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.ja va:240)
at
sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:
494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at SQL.main(SQL.java:90)
I guess this is because I do not have type2 application driver
installed properly? Since I
am not administrator, I switch to use the universal driver
(com.ibm.db2.jcc.DB2Driver), and
call the Type2 protocal again (without giving the server address,
port number, username/password), I get the following error:
com.ibm.db2.jcc.c.SqlException: Failure in loading T2 native library
db2jcct2
at com.ibm.db2.jcc.t2.a.a(a.java:31)
at
com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Conf iguration.java:70)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:1 78)
at java.sql.DriverManager.getConnection(DriverManager .java:
525)
at java.sql.DriverManager.getConnection(DriverManager .java:
193)
at SQL.main(SQL.java:95)
I am wondering how could I install the minimal db2 client on my side
to make it work. Thanks a bunch!