This is a discussion on db2 java application of 32-bit and 64-bit DB2 insatnce within the DB2 forums, part of the Database Server Software category; --> I did a test on running db2 database java code on 32-bit and 64-bit db2 instance. It seams that ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I did a test on running db2 database java code on 32-bit and 64-bit db2 instance. It seams that java application with 32-bit JVM couldn't run at 64-bit db2 instance. Also 64-bit JVM couldn't run at 32-bit db2 instance. I will show the following error: A database problem has occurred - java.sql.SQLException: No suitable driver IBM only provides SQC on different 32-bit and 64-bit. DB2 instance will have different LIB for 32 and 64 bit instance. But for JAVA, I didn't find JAVA driver with 32-bit and 64-bit. How DB2 get the driver for 32-bit and 64-bit instance? When I upgrade db2 instance 32-bit to 64-bit, What will I need to do for the exsting JAVA database application? I just need to use 64-bit JVM recompile it and run it wiht 64-bit JVM? thanks, George |
| |||
| zgh1970 wrote: > I did a test on running db2 database java code on 32-bit and 64-bit > db2 instance. > It seams that java application with 32-bit JVM couldn't run at 64-bit > db2 instance. Correct, if you're using the Type2 driver. > Also 64-bit JVM couldn't run at 32-bit db2 instance. > I will show the following error: > A database problem has occurred - java.sql.SQLException: No suitable > driver > > IBM only provides SQC on different 32-bit and 64-bit. > DB2 instance will have different LIB for 32 and 64 bit instance. > But for JAVA, I didn't find JAVA driver with 32-bit and 64-bit. The type 2 driver will load libdb2 from the sqllib/lib directory, and that's causing your problem. > How DB2 get the driver for 32-bit and 64-bit instance? > When I upgrade db2 instance 32-bit to 64-bit, What will I need to do > for the exsting JAVA database application? Use a 64-bit JVM ;-) > I just need to use 64-bit JVM recompile it and run it wiht 64-bit JVM? You shouldn't need to recompile anything, unless you have your own JNI code. Or you can use a type 4 driver which would provide further independence from the DB2 native code. |
| ||||
| On Mar 18, 11:27*am, Darin McBride <dmcbr...@naboo.to.org.no.spam.for.me> wrote: > zgh1970 wrote: > > I did a test on running db2 database java code on 32-bit and 64-bit > > db2 instance. > > It seams that java application with 32-bit JVM couldn't run at 64-bit > > db2 instance. > > Correct, if you're using the Type2 driver. > > > Also 64-bit JVM couldn't run at 32-bit db2 instance. > > I will show the following error: > > A database problem has occurred - java.sql.SQLException: No suitable > > driver > > > *IBM only provides SQC on different 32-bit and 64-bit. > > DB2 instance will have different LIB for 32 and 64 bit instance. > > But for JAVA, I didn't find JAVA driver with 32-bit and 64-bit. > > The type 2 driver will load libdb2 from the sqllib/lib directory, and that's > causing your problem. > > > How DB2 get the driver for 32-bit and 64-bit instance? > > When I upgrade db2 instance 32-bit to 64-bit, What *will I need to do > > for the exsting JAVA database application? > > Use a 64-bit JVM ;-) > > > I just need to use 64-bit JVM recompile it and run it wiht 64-bit JVM? > > You shouldn't need to recompile anything, unless you have your own JNI code. > Or you can use a type 4 driver which would provide further independence > from the DB2 native code. Hi, Darin, You are right. That code is using JDBC type-2. I tried useing the type 4, I can use 32-bit or 64-bit JVM to run the class file without recompiling. thanks |