Db2

Db2

Connect with Db2, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  federation to mariadb JDBC , VARCHAR_NO_TRAILING_BLANKS is ignored

    Posted Mon July 06, 2020 09:50 AM
    VARCHAR_NO_TRAILING_BLANKS 'Y' in server definition is ignored 

    REATE SERVER webhttpdr01
    TYPE JDBC
    VERSION '1.0'
    WRAPPER "JDBC"
    OPTIONS
    (
    ,DB2_MAXIMAL_PUSHDOWN 'Y'
    ,DRIVER_CLASS 'org.mariadb.jdbc.Driver'
    ,DRIVER_PACKAGE '/home/db2inst2/config/jdbc/mariadb-java-client-2.6.1.jar'
    ,JDBC_LOG 'Y'
    ,PUSHDOWN 'Y'
    ,URL 'jdbc:mariadb://XXXXXXXX:3306/r_espaceclient01'
    ,VARCHAR_NO_TRAILING_BLANKS 'Y'
    );

    CREATE USER MAPPING FOR db2inst2 SERVER webhttpdr01 OPTIONS (REMOTE_AUTHID 'XXXXX' ,REMOTE_PASSWORD 'XXXX');

    create nickname webhttpdr01_r_espaceclient01.tb_demande for webhttpdr01."tb_demande";

    select count(*) from webhttpdr01_r_espaceclient01.tb_demande  where col1='testval1'

    DB2 push to mariadb select ..... where trim (col1) = 'testval'

    to work we need to add VARCHAR_NO_TRAILING_BLANKS on eatch column of the nickname

    alter nickname WEBHTTPDR01_R_ESPACECLIENT01.TB_DEMANDE alter column "col1" OPTIONS (ADD VARCHAR_NO_TRAILING_BLANKS 'Y');




    ------------------------------
    malek shabou
    ------------------------------

    #Db2
    #Db2EarlyAccessProgram(EAP)Forum


  • 2.  RE: federation to mariadb JDBC , VARCHAR_NO_TRAILING_BLANKS is ignored

    Posted Tue July 07, 2020 02:44 PM
    Hi Malek,

    Can you please provide the detail on the level of EAP.

    ------------------------------
    MOJGAN SAMIFANNI
    ------------------------------



  • 3.  RE: federation to mariadb JDBC , VARCHAR_NO_TRAILING_BLANKS is ignored

    Posted Mon July 13, 2020 10:23 AM
    Malek,

    We're still investigating this issue and will let you know as soon as we have any progress or need any more information from you, thanks for your patience.

    Lei

    ------------------------------
    LEI CUI
    ------------------------------



  • 4.  RE: federation to mariadb JDBC , VARCHAR_NO_TRAILING_BLANKS is ignored

    Posted Mon July 13, 2020 10:46 AM
    Hi malek,
    I can't reproduce the issue with build
    DB2Les ID des codes d'intégration sont "DB2 v11.5.4.0", "s2006161200",

    Can you collect some information for for further investigation pls?
    1.db2look info
    2. The trace info of running querying statement with db2trc tool
    3. explain plan of running querying statement;
    4. describe the nickname
    5. db2set -all
    6. db2level to double check the project version.

    Thanks



    ------------------------------
    Jun Hui Liu
    ------------------------------



  • 5.  RE: federation to mariadb JDBC , VARCHAR_NO_TRAILING_BLANKS is ignored

    Posted Mon July 20, 2020 02:11 AM
    Hello Malek,

    As you also reported this issue in Salesforce through the standard support process, we will then work with you there for an easier and prompt communication, many thanks.

    ------------------------------
    LEI CUI
    ------------------------------