Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sep 4, 2025 10:46:13 AM
May 3, 2024 6:08:04 AM
This article provides a comprehensive guide to efficiently install the PostgreSQL ODBC client on Linux for a PostgreSQL target endpoint.
If the PostgreSQL serves as Replicate source endpoint, please check: How to Install PostgreSQL ODBC client on Linux for PostgreSQL Source Endpoint
rpm -ivh postgresql13-libs-13.2-1PGDG.rhel8.x86_64.rpm
rpm -ivh postgresql13-odbc-13.02.0000-1PGDG.rhel8.x86_64.rpm
rpm -ivh postgresql13-13.2-1PGDG.rhel8.x86_64.rpm
export LD_LIBRARY_PATH=/usr/pgsql-13/lib:$LD_LIBRARY_PATH
rpm -ivh unixODBC-2.3.7-1.el8.x86_64.rpm
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/pgsql-13/lib/psqlodbcw.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1
[pg15]
Driver = /usr/pgsql-13/lib/psqlodbcw.so
Database = targetdb
Servername = <targetDBHostName or IP Address>
Port = 5432
UserName = <PG User Name>
Password = <PG user's Password>
Thank you @john_wang .
In my case, while testing the ODBC connection, I encountered the following error. This may have been caused by the collation settings of my PostgreSQL database or the fact that my RHEL 9 locale was set to tr-tr or I have installed rpm packages with different versions rather than you specified:
RetCode: SQL_ERROR SqlState: 01000 NativeError: 0 Message: [unixODBC][Driver Manager]Can't open lib 'PostgreSQL Unicode(x64)' : file not foundI downloaded and installed the latest PostgreSQL ODBC drivers compatible with RHEL 9. (Links may get outdated soon, try to find the latest ones)
The following commands were used:
Installing the packages:
sudo rpm -ivh postgresql13-libs-13.16-2PGDG.rhel9.x86_64.rpmsudo rpm -ivh postgresql13-odbc-13.02.0000-2PGDG.rhel9.x86_64.rpm# solved dependency error with installing the default unixODBC:sudo yum install unixODBCsudo rpm -ivh postgresql13-odbc-13.02.0000-2PGDG.rhel9.x86_64.rpmsudo rpm -ivh postgresql13-13.16-2PGDG.rhel9.x86_64.rpmCreating an Empty ODBC Configuration File as the user Attunity:
To resolve this issue, I created an empty .odbc.ini file under the attunity user's home directory.
[ert@localhost etc]$ sudo su attunity [attunity@localhost etc]$ nano ~/.odbc.ini [attunity@localhost etc]$ ls ~/.odbc.ini ls: cannot access '/home/attunity/.odbc.ini': No such file or directory [attunity@localhost etc]$ touch ~/.odbc.iniodbcinst -j After creating the .odbc.ini file, resulting odbcinst -j :
[attunity@@localhos etc]$ odbcinst -junixODBC 2.3.9 DRIVERS............: /etc/odbcinst.ini SYSTEM DATA SOURCES: /etc/odbc.ini FILE DATA SOURCES..: /etc/ODBCDataSources USER DATA SOURCES..: /home/attunity/.odbc.ini SQLULEN Size.......: 8 SQLLEN Size........: 8 SQLSETPOSIROW Size.: 8By following these steps, the ODBC connection test was successful.
Can we install the pgsql-16 client?
Hello @vinci_wu ,
Not exactly. As of Qlik Replicate version 2024.11 (official release) and the upcoming 2025.5 major release (currently in Technical Preview), the required ODBC driver version remains 13.2.
Regards,
John.