problem getting started with pyDB2

jimburton jimburton1 at
Mon Jan 23 17:15:02 EST 2006

Hi, I'm using python 2.4, DB2 8.1 (with development libraries) on
ubuntu linux 5.10. I installed PyDB2 1.1 but when I try to connect to
any database I've got this:

>>> import DB2
>>> conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='secret')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/", line 271, in __init__
    self._db = _db2.connect(*args, **kwargs)
_db2.DatabaseError: ('I', -1, 'Invalid Handle')

After installing pydb2 I got errors about the missing file
so I copied this file from /opt/IBM/db2/V8.1/lib into /usr/lib - am I
now missing other libs? If so how do I let python know about the db2


More information about the Python-list mailing list