Andrew Channels Dexter Pinion

Wherein I write some stuff that you may like to read. Or not, its up to you really.

April 11, 2003

Python for DB2 Anyone?

Not content with looking at a number of different object/relational mapping tools (and the list is growing by the day), I now find myself extending my repertoire to include another database.

This week, I have been mostly looking at DB2. Note that this is DB2 Universal Database for UNIX, Windows and Linux version 8.1, not the cunningly named, but completely different DB2 Universal Database for iSeries, or the even more completely different DB2 Universal Database fo z/OS and OS/390. Don't you just love marketing?

Anyway, I've wrestled the installer to the ground and forced it onto my ever more groaning hard drive (current RDBMS count - six). I've installed the sample database and, like the good little Python programmer I am I thought I would glance through Patrick's DB2 and Python tutorial at IBM.

Which is were I came to a grinding halt. Like all of Patrick's work the tutorial is well written, concise and eminently understandable. But it requires me to (strangely enough) use the Python DB2 Interface And Tools suite hosted at Sourceforge. Which has a C module as a component. Which, naturally, needs to be compiled in the same target enivornment as your Python and DB2 installation.

Ah. That will be Windows2000 then. Guess what, I don't have Visual C++ installed so this chokes at the build stage.

Has anyone got a compiled module that I can use? Preferably for DB2 8.1 and Python 2.2.2. I'll post a question to the ever helpful DB-Sig mailing list as well.

Meanwhile I'll have to struggle on with inferior tools.

Posted by Andy Todd at April 11, 2003 03:32 PM


DB2 works very well via ODBC. So you may check mxODBC etc

Posted by: dvs on September 19, 2003 02:23 PM