pythonodbcinformixavaya

IfxPy connection to Informix DB problem - user with added hostname


I am currently trying to establish connection from server (64b windows) to Avaya CMS DB - which is Informix engine - using IfxPy. IfxPy 3.0.5 comes with HCL ONEDB ODBC DRIVER (version 1.0.0.0), which is copied into site-packages. I think I've properly installed the IfxPy module, pointed ODBC registers to iclit09b.dll, setup system environment "INFORMIXDIR". I am able to import IfxPy, but IfxPy.connect returns error from db server. The error I got suggests, that ODBC driver adds server hostname with "@" to the user id and Informix is not understanding that. Is there anybody with experience with connecting to Avaya CMS DB from Python?

import os
if 'INFORMIXDIR' in os.environ: #add dll lookup folder to BIN folder
    os.add_dll_directory(os.path.join(os.environ['INFORMIXDIR'],"bin"))
import IfxPy
conStr="SERVER=cms_net;HOST=10.10.10.10;SERVICE=50001;PROTOCOL=olsoctcp;DATABASE=cms;UID=myuser;PWD=mypassw;CLIENT_LOCALE=en_US.UTF8;"

conn = IfxPy.connect(conStr, "", "") 
IfxPy.close(conn)

Exception I get: [OneDB][OneDB ODBC Driver][OneDB]Incorrect password or user myuser@myserver[myserver full domain path] is not known on the database server. SQLCODE=-951

Any ideas? I worked with our Avaya guy to add user into proper group and grant DB access. But we still can not figure this one out. NB: DB is set to accept protocol olsctcp on port 50001. Thank you.

I did research on internet, with not much luck. I am considering to use Informix Client SDK from IBM, hopefully that will work. I've also tested to establish connection from ODBC 64b windows, it allows proper setup, but test fails with exactly same error.


Solution

  • So, for everyone dealing with connection to Informix, error -951 really means that user is not created on DB or that user has one time password and cannot login. That was our case, after we've tried to logon directly on database server. In other news, IfxPy can be just pointed to ODBC iclit09b.dll (from IBM Informix ODBC driver, or the one comming in with IfxPy 3.0.5 installation) and it will work without INFORMIXDIR system variable, it will also work without setting up ODBC driver in Windows registers.