Preparing Postgres datasource for Unica Campaign

Complete the following steps to use a Postgres database as a data source for Unica Campaign.

Unica Campaign supports Postgres for both System and User databases. For information on supported versions, see the Recommended Software Environments and Minimum System Requirements document.

Database Client / Connector Installation

  1. Install the Postgres ODBC driver version 16_00_0000 (or the latest version), where the Unica Campaign analytical server (listener) is installed.

    Link to download psqlODBC installer for Windows

  2. Create DSN for Unica Campaign system database in Windows ODBC Manager (SystemDSN). Use the driver installed and choose ANSI, ANSI(x64), Unicode or Unicode(x64) as per your system and database requirement.
  3. Import PostgreSQLTemplate.xml in Unica Campaign data sources if not already imported by installer
  1. Please use Postgres ODBC driver 13.0 or 14.0 version.
  2. Create ODBC DSN for Postgres:
    Sample example odbc.ini file entry
    • [PostgreSQL_DSN]
    • Driver=<DRIVER_PATH>/
    • ServerName=<your_db_server_name>
    • Port=5432
    • UserName=<your_db_user_name>
    • Password=<your_db_password>
    • Database=<your_db_name>
    • ByteAsLongVarBinary=1
    • UseDeclareFetch=1
  3. Setup up with below entries
    • LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$lib_path:$Postgres_Driver_path
    • export LD_LIBRARY_PATH
    • ODBCINI=/etc/odbc.ini
    • export ODBCINI
    • ODBCINST=/etc/odbcinst.ini
    • export ODBCINST
  4. Test the connection using isql or the Campaign CxnTest utility.
  5. Import PostgreSQLTemplate.xml for Postgres and configure it.