Preparing MariaDB datasource for Unica Campaign

Before you install Unica products, ensure that you run this query on MariaDB. SET sql_mode = 'NO_ZERO_DATE' 

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

Unica Campaign supports MariaDB for both System and User databases. For information on supported versions, see the Recommended Software Environments and Minimum System Requirements document. For AIX, we do not support MariaDB as a System and User Database.

Database Client / Connector Installation

Windows:
  1. Configure the following settings in my.ini for MariaDB database server is installed on Windows:
    [mysqld] 
    sql-mode="NO_BACKSLASH_ESCAPES"
    innodb-page-size=32768
    character-set-server=utf8
    sql_mode='NO_BACKSLASH_ESCAPES'
    innodb_strict_mode=0
    wait_timeout = 2592000
  2. Install the MariaDB Client and JDBC server, where the Unica Campaign analytical server (listener) is installed.
  3. Create DSN for Unica Campaign system database in Windows ODBC Manager (SystemDSN).
  4. Import MariaODBCTemplate.xml in Unica Campaign data sources if not already imported by installer.

Linux/SUSE

  1. Add the following lines to server.cnf (/etc/my.cnf.d/server.cnf ) in section mysqld when MariaDB database is installed on Linux
    [mysqld]
    lower_case_table_names = 1
    sql-mode="NO_BACKSLASH_ESCAPES"
    innodb-page-size=32768
    character-set-server=utf8
    sql_mode='NO_BACKSLASH_ESCAPES'
    innodb_strict_mode=0
    wait_timeout = 2592000
  2. To install MariaDB Connector 3.0.2 for SUSE, complete the following substeps.
    1. Go to https://downloads.mariadb.org/mariadb/repositories/#distro=SLES%26distro_release=sles12-amd64--sles12%26mirror=tuna%26version=10.4
    2. Run the following commands.
      • sudo rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
      • sudo zypper addrepo --gpgcheck --refresh https://yum.mariadb.org/10.4/sles/12/x86_64 mariadb
      • sudo zypper addrepo --gpgcheck --refresh https://yum.mariadb.org/10.4/sles/12/x86_64 mariadb
      • sudo zypper install MariaDB-connector
  3. To install MariaDB Connector/ODBC 3.1.0 for RHEL, complete the following substeps.
    • Create directory using odbc_package and navigate to cd odbc_package.
    • Run the following commands.
      • wget https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.1.0/mariadb-connector-odbc-3.1.0-rc-rhel7-x86_64.tar.gz
        tar -xvzf mariadb-connector-odbc-3.1.0-ga-rhel7-x86_64.tar.gz
        sudo install lib64/libmaodbc.so /usr/lib64/
        MariaDB JAVA Client (JDBC Client): v2.4.0 -
  4. Create ODBC DSN for MariaDB:

    Sample example odbc.ini file entry

    [MariaDB-server]

    Description=MariaDB server

    Driver=MariaDB ODBC 3.0 Driver

    SERVER=<your server>

    USER=<your user>

    PASSWORD=<your password>

    DATABASE=<your database>

    PORT=<your port>

  5. Setup up setenv.sh with below entries.

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$lib_path:$Maria_DB_Driver_path

    export LD_LIBRARY_PATH

    ODBCINI=/etc/odbc.ini

    export ODBCINI

    ODBCINST=/etc/odbcinst.ini

    export ODBCINST

  6. Test the connection using isql or the Campaign CxnTest utility.
  7. Import MariaODBCTemplate.xml for MariaDB and configure it.