I'd like to pull out data from the Cisco UCCX database (Informix) with a Python script.
After installing the Informix Client SDK and pyodbc as described in this guide, I run the following connection:
pyodbc.connect('SERVICE=1504;PROTOCOL=onsoctcp;CLIENT_LOCALE=en_US.UTF8;DB_LOCALE=en_US.UTF8;DRIVER={IBM INFORMIX ODBC DRIVER (64-bit)};UID=uccxhruser;PWD=my_pwd;DATABASE=db_cra;HOST=my-uccx;SERVER=my-uccx_uccx')
But I get the following error:
Error: ('HY000', '[HY000] [Informix][Informix ODBC Driver][Informix]INFORMIXSERVER does not match either DBSERVERNAME or DBSERVERALIASES. (-761) (SQLDriverConnect)')
How can I fix this?
$INFORMIXSERVER(or specified its value in the connection string) to an incorrect value. Server names should not include dashes, so it might be thatSERVER=my-uccx_uccxin the connection string is faulty, or it may be somewhere else. I'd hazard a guess that your server ismy_uccx_uccxinstead — but that's a guess. Knowing what is specified for the actual server will be crucial. - Jonathan LefflerINFORMIXSERVERcorrespond to theSERVERparam in the connection string? - floatingpurrINFORMIXSERVERexplicitly. Maybe things are like your guess. I'll try to verify the UCCX/Informix server name. - floatingpurrmy_uccx_uccxinstead ofmy-uccx_uccxand now it works. If you turn your comment into an answer, I'd be happy to accept it! - floatingpurr