From: Dan S. <de...@gm...> - 2006-06-24 17:19:31
|
David: You have to catalog the server node and database first, then pass the name of the cataloged database as the first argument. Your acid test here is if you can connect to the database from the DB2 command line, you will be able to connect to the same database from PyDB2. See http://ibm.com/developerworks/db2/library/techarticle/0301chong/0301chong2.html for a reasonable explanation of the commands and libraries involved. Something like: C:\> db2 catalog tcpip node btvmanr remote btvmanr.btv.ibm.com server 446 C:\> db2 catalog database BYDB2MFG at node btvmanr authentication dcs ... should do the trick. Dan On 24/06/06, David Katcoff <ka...@us...> wrote: > On windows/XP, trying to connect to OS mainframe domain with > import DB2 > con = DB2.Connection('btvmanr.btv.ibm.com:446/BYDB2MFG','user','pw') > > get: > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > File "DB2.py", line 271, in __init__ > self._db = _db2.connect(*args, **kwargs) > DatabaseError: ('HY009', -99999, '[IBM][CLI Driver] CLI0124E Invalid > argument value. SQLSTATE=HY009') > > Obviously I'm not passing the right dsn. I'm using the same dsn as on AIX > java, without the jdbc:db2: prefix, but the same port. I successfully > connected to btvmanr using config mgr with db2 8.1. > > -Dave Katcoff 802-769-4162 > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > |