I had the PostgreSQL drivers working on my RHEL 6. But after I installed Microsoft® SQL Server® ODBC Driver 1.0 for Linux I can no longer connect to PosgreSQL data sources. I can connect to SQL Server data sources fine.
When I had this same issue a week ago I uninstalled MS SQL Server ODBC driver from Linux and it fixed the issue. I had to copy the psqlodbcw.so files from another machine to replenish the files. I don't want to do the same this time.
I want both drivers to work on Linux.
This time around the setup files got deleted: /usr/lib64/libodbcpsqlS.so. Replenishing it did not fix the issue. I kept getting the following error in spite of the file being present with rwx permisions:
lib64]# isql -v STUDENT dsname pwd12345
[unixODBC][Driver Manager]Can't open lib '/usr/lib64/psqlodbc.so' : file not found
[ISQL]ERROR: Could not SQLConnect
Here is a printout of the file permissions:
lib64]# ls -al p*.so
lrwxrwxrwx. 1 root root 12 Dec 7 09:15 psqlodbc.so -> psqlodbcw.so
-rwxr-xr-x. 1 root root 519496 Dec 7 09:35 psqlodbcw.so
and my odbcinst.ini file looks as follows:
Description=ODBC for PostgreSQL
I also referred to this link: http://mailman.unixodbc.org/pipermail/unixodbc-support/2010-September.txt