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
Overview
- Download the PostgreSQL ODBC client software.
- Upload the downloaded files to your Replicate Linux Server.
- Install the RPM files in the specified order.
- Take note of considerations or setup instructions during the installation process.
Steps
- Download the PostgreSQL ODBC client software
Please choose the appropriate version of the PostgreSQL client software and the corresponding folder for your Linux operating system. In this article, we are installing PostgreSQL ODBC Client version 13.2 on Linux 8.5.
- Upload the downloaded files to a temporary folder in your Qlik Replicate Linux Server
- Install the RPM files in the specified order
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
- Take note of considerations or setup instructions during the installation process.
- Note the installation folder (default: "/usr/pgsql-13/lib")
- Open site_arep_login.sh in /opt/attunity/replicate/bin/ and add the installation folder as a LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/usr/pgsql-13/lib:$LD_LIBRARY_PATH
- Save the site_arep_login.sh file and restart Replicate Services.
- unixODBC is a prerequisite. If it's not already present on your Linux Server, make sure to install it before PostgreSQL ODBC client software installation:
rpm -ivh unixODBC-2.3.7-1.el8.x86_64.rpm
- "/etc/odbcinst.ini" is required:
[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
- "psql" is required if the task set to Batch optimized apply mode.
- "/etc/odbc.ini" is optional and typically not required, unless it becomes necessary for troubleshooting connectivity issues by "isql".A sample:
[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>
Environment
- Qlik Replicate all versions
- PostgreSQL Server all versions
- PostgreSQL Client version 13.2
Qlik Replicate