Skip to content

pyodbc fails to connect to Informix DSN while isql works perfectly (-11060 SQLDriverConnect error) #27

@ThomasSchillingAdmin

Description

@ThomasSchillingAdmin

I'm working with credativ-pg-migrator (thanky you for the great work) to migrate data from Informix to PostgreSQL using a DSN connection via pyodbc. My system is Debian-based, using Python 3.12, unixODBC 2.3.12, and IBM INFORMIX ODBC DRIVER.

The DSN is correctly configured in /etc/odbc.ini and works flawlessly with isql:

isql -v jetze

However, any attempt to connect via pyodbc.connect("DSN=jetze") fails with the following error:

pyodbc.Error: ('H000', '[H000] [ (-11060) (SQLDriverConnect)')

I've verified the following:

DSN appears in pyodbc.dataSources()

Treiberpfad in odbcinst.ini is correct (iclit09b.so exists and is readable)

DSN contains Servername, Database, LogonID, pwd, locales, and translation DLL

sqlhosts definition matches SERVER=tcp_azur_Test with onsoctcp, hostname, and service/port

/etc/services contains the correct entry for informix 9088/tcp

Environment variables are properly set:

export ODBCINI=/etc/odbc.ini
export ODBCINSTINI=/etc/odbcinst.ini

All attempts to bypass DSN and use a manual connection string also result in the same -11060 error.

Furthermore, I attempted to downgrade pyodbc to version 4.0.34, but the build fails under Python 3.12 due to compatibility issues with Unicode APIs.

Request:

Is there known incompatibility between pyodbc and Informix ODBC drivers in Python 3.12?

Would it be possible to recommend either:

A working version of pyodbc that supports Informix on Python ≥ 3.12

A workaround or config fix that avoids -11060

Integration of an alternative Python ODBC layer compatible with credativ-pg-migrator?

Any help or insights would be appreciated — thanks!

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions