DB2 from Java
-
From Java, is connecting to a DB2 database one of those things that's no harder than any other database connection, or is it one of those things that's a major PITA where two days later I'll be compiling some shitty outdated driver from source in a last-ditch effort while drinking vodka straight from the bottle and sobbing?
-
http://www-01.ibm.com/support/docview.wss?uid=swg21363866
Granted I've never used DB2, but jdbc is jdbc.
-
@JazzyJosh Thanks. I'm mostly looking for personal experience, because things that look easy often aren't.
-
@Yamikuronue Totally understand ;) Dealing with config is awful.
-
@JazzyJosh You do have to match your driver to the JDBC version whose features you're using, though. Although these days, all JDBC drivers should be for JDBC 4.0 or newer. (Side note: Don't confuse this with the JDBC Driver Type which go from 1 to 4 with 4 being the most portable.)
Still, DB2 is an IBM product, so I expect it to have very good support for Java.
Edit:
DB2 JDBC drivers, which have links to both JDBC 3.0 and 4.0 drivers. These appear to be Type 4 drivers (pure Java).
-
Java is enterprise.
DB2 is enterprise.IBM actually actively pushes both to this very day.
If there isn't a sane and workable JDBC driver for DB2, I would... Not be surprised in the slightest.That said, WtfCorp loves it some Java/COBOL/DB2 apps.
-
@Yamikuronue said in DB2 from Java:
while drinking vodka straight from the bottle and sobbing
I love you. Platonic love. But I still feel like that one statement would lead me to believe we would be fast friends.
-
@Polygeekery @Yamikuronue is my spirit animal.
-
@Weng Because WTFCorp has never heard of testing?
-
@Polygeekery "Developers should test better.
-
@Weng Testers should develop better.
-
“Testing: We need some managers in charge of developing a proposal to form a committee to oversee the outsourcing of that.”
-
@Polygeekery 100% true facts
-
New question: can I run an SSIS package from Java easily?
-
@Yamikuronue Call dtexec.exe
-
Am I crazy, or is the JDBC driver different than the ODBC driver?
-
@Yamikuronue Well, JDBC is not ODBC so, yes, they're different. <-- major assumption.
-
@JazzyJosh I keep asking for JDBC drivers at work and I keep getting replies about the ODBC driver O.o
-
@Yamikuronue From memory every JDBC driver I ever used behaved identically to ODBC anyway (aside from things like loading it and connecting)
-
@Weng Right but... google says I would need a bridge of some kind to be able to use it in a Java program?
The IBM i Access kit seems to include the ODBC and a .NET driver, but not the Java one...
-
@Yamikuronue Yes, if you want to connect to a database using ODBC with Java, you're going to want a JDBC to ODBC bridge.
But the JDBC driver was already posted above, so why not use the JDBC driver?
-
@JazzyJosh Because I'm an idiot? >.>
Yeah, in searching for WTF I'm even looking for I found again where the IBM Toolkit thingie is and downloaded that, added the jar to my project, and it seems to compile. Unfortunately I'm still waiting on a username, password, and server name, so I can't be sure it connects, but yeah, that seems to be the driver I need. Which is good because I got forwarded to yet another person who "might know something".
-
@Yamikuronue said in DB2 from Java:
Unfortunately I'm still waiting on a username, password, and server name, so I can't be sure it connects
Hurry up and wait. SNAFU.
-
@Yamikuronue said in DB2 from Java:
I keep asking for JDBC drivers at work and I keep getting replies about the ODBC driver O.o
because your work people are apparently idiots.
-
@Yamikuronue
what kind of server is the db2 database one? i only have experience hitting iSeries as400 with db2, for which the db2 jdbc driver is in jt400.jar I believe.
-
@darkmatter said in DB2 from Java:
iSeries as400 with db2
That
@darkmatter said in DB2 from Java:
for which the db2 jdbc driver is in jt400.jar
oh good, I did find the right jar. Thanks!
-
@Yamikuronue
one thing I thought would never come in handy.... experience in java programming on an as400 with db2!
if you have trouble getting connected i can probably give some help.
-