Db2 (On Premises and Cloud)

Expand all | Collapse all

Db2 Federation to MySQL

  • 1.  Db2 Federation to MySQL

    Posted 30 days ago

    Hi,

    I wanted to test federation wih the current development build "DB2 v11.1.2.2", "s1705181300". It seems that only MySQL Enterprise or a Commercial version is support. That's bad for most customers I think.

    Here are the steps to reproduce:

    CREATE WRAPPER ODBC LIBRARY 'libdb2rcodbc.so' 
           OPTIONS (MODULE '/db2/db2fed01/sqllib/federation/odbc/lib/libodbc.so');

    CREATE SERVER nextcloud TYPE mysql 
     VERSION 4.0 WRAPPER ODBC 
     OPTIONS (ADD NODE 'nextcloud', DBNAME 'nextcloud');

    CREATE USER MAPPING FOR db2fed01 SERVER nextcloud OPTIONS (REMOTE_AUTHID 'root', REMOTE_PASSWORD '********');

    CREATE NICKNAME mysql_nextcloud_db FOR nextcloud."oc_accounts";

     

     

     

    [FluidQuery][ODBC MySQL Wire Protocol driver]Connections to MySQL Community Servers are not supported. Please contact MySQL to obtain a MySQL Enterprise or Commercial version.

    The MySQL version is shipped by Debian Linux 8 (Jessie) and MySQL version is mysql  Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.3

    So please support also NON Enterprise and NON Commersion versions of MySQL!

    Is there any workaround to get it running for test purposes (hidden reg variable ie)?

    Thanks.

    Best regards,

    Gerhard Paulus



  • 2.  RE: Db2 Federation to MySQL

    Posted 30 days ago

    Hi,

    it's solved.

    The open source MySQL ODBC driver must be used https://dev.mysql.com/downloads/file/?id=470411

    New entry in sqllib/cfg/odbc.ini

    [NC01]
    Description     = Nextcloud DB 01
    Driver          = /opt/odbc/mysql-connector-odbc-5.3.8-linux-glibc2.12-x86-64bit/lib/libmyodbc5a.so
    Server=lxncl01.fritz.box
    Port=3306
    Option=3
    ReadOnly=No

    Create Server, Usermapping and also Nickname works now with the MySQL open source ODBC driver.

    Best regards,

    Gerhard Paulus