Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iODBC on AIX #77

Open
lm8 opened this issue May 31, 2022 · 1 comment
Open

iODBC on AIX #77

lm8 opened this issue May 31, 2022 · 1 comment

Comments

@lm8
Copy link

lm8 commented May 31, 2022

We're using Cognos on AIX 7.2 and were told that we need to use iODBC to connect to a database through the Cognos product. IBM claimed they supply a version of iODBC with Cognos as per their documentation: https://www.ibm.com/docs/en/cognos-analytics/11.0.0?topic=sudcrd-access-odbc-data-sources-unix-linux-operating-systems which states "On UNIX operating systems, the open source iODBC driver manager is provided as part of the IBM Cognos installation." However, when we contacted IBM support they said the documentation was wrong and they do not supply a copy of iODBC with installation. I attempted to build iODBC from the source code on AIX using version 3.52.15. I'm using gcc and creating 32 bit libraries and executables since Cognos does not support 64 bit database drivers for that product. iODBC built from source with no major issues. However, when we try to connect to either a PostgreSQL database using the PostgreSQL ODBC driver or a Microsoft SQL database using FreeTDS, we see garbage on the screen.

This is a typical output we see when we run iodbctest:
1: SQLDriverConnect = ol o onc osre:Afl rdrcoyi h ahnm osnteit
I h evrrniglclyadacpig oncin nUi oansce /m/sPSL53"
(101) SQLSTATE=80
1: ODBC_Connect = ol o onc osre:Afl rdrcoyi h ahnm osnteit
I h evrrniglclyadacpig oncin nUi oansce /m/sPSL53"
(101) SQLSTATE=80

I've tried building unixODBC from source as well and connecting to the same databases with the same drivers and it works. However, IBM does not support unixODBC on AIX and claims we can only get Cognos to connect if we have a working version of iODBC.

We've tried to debug the SQL error numbers that were displayed with no luck. We've tried several different settings with the odbc.ini file. Also, no luck. The exact same drivers work fine with no errors with UnixODBC. We're unable to get any assistance from IBM on this even though they advised us to buy an AIX system and claimed that Cognos supported connection to PostgreSQL with iODBC.

Do you have any ideas why we're seeing gibberish in the error messages or how to get a connection working properly on AIX? Is there anything specific we need to make sure to do when building iODBC for AIX. We're building the source code with the following settings:
export OBJECT_MODE=32
CFLAGS includes -maix32
LDFLAGS includes -maix32 -Wl,-bbigtoc

Thank you.

@openlink
Copy link
Owner

Please try adding the following flag to your postgres or freetds DSN:

DriverUnicodeType=UTF16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants