python connect to db2

Jarek Zgoda jzgoda at
Fri Jan 14 15:40:08 EST 2005

yuzx wrote:

> 	>>> conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='ibmdb2')
> but i don't know about dsn,

If the database is DB2/400 and you try to connect from iSeries, dsn 
would be '*local' for local database, or its name (not hostname or IP 
address!) as returned by dsprdbdire command for remote databases.

Jarek Zgoda |

More information about the Python-list mailing list