Db2

Db2

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

 View Only
  • 1.  ODBC Connection Setup on AIX environment with pureScale

    Posted 3 days ago

    I am looking for guidance regarding setting up an ODBC client connection to a windows application.

    I have a Db2 database 11.5.9 with pureScale on AIX  with multiple applications connecting to it. Most applications are connecting through a JDBC connection URL but one does not have that functionality. I need now to setup an ODBC connection to facilitate the connection.

    Thank You for help.



    ------------------------------
    jaison chipuka
    ------------------------------


  • 2.  RE: ODBC Connection Setup on AIX environment with pureScale

    Posted 3 days ago

    Assuming that /etc/host looks similar to this entries:

    172.16.165.63 jsps1.fyre.ibm.com jsps1 # primary pureScale member 0
    172.16.167.133 jsps2.fyre.ibm.com jsps2 # primary pureScale member 1
    172.16.230.93 shps011.fyre.ibm.com shps011 #standby pureScale member 0
    172.16.36.121 shps012.fyre.ibm.com shps012 #standby pureScale member 1

    configure  ~/sqllib/cfg/db2dsdriver.cfg like this:

    <configuration>
    <dsncollection>
    <dsn alias="HADRDB" name="HADRDB" host="jsps1" port="50000"/>
    </dsncollection>
    <databases>
    <database name="HADRDB" host="jsps1" port="50000">
    <parameter name="keepAliveTimeOut" value="10"/>
    <parameter name="MemberConnectTimeout" value="2"/>
    <acr>
    <parameter name="enableACR" value="true"/>
    <parameter name="maxAcrRetries" value="30"/>
    <parameter name="acrRetryInterval" value="3"/>
    <parameter name="enableAlternateServerListFirstConnect" value="true"/>
    <parameter name="enableSeamlessAcr" value="true"/>
    <alternateserverlist>
    <server name="m0" hostname="jsps1" port="50000"/>
    <server name="m1" hostname="jsps2" port="50000"/>
    </alternateserverlist>
    <alternategroup>
    <parameter name="enableAlternateGroupSeamlessAcr" value="true"/>
    <database name="HADRDB" host="shps011" port="50000"/>
    </alternategroup>
    </acr>
    </database>
    </databases>
    </configuration>

    You may want to validates the syntax and the semantics of the configuration file:

    $ db2cli validate
    ===============================================================================
    Client information for the current copy:
    ===============================================================================
    Client Package Type : IBM DB2 Connect Server
    Client Version (level/bit): DB2 v11.1.2.2 (s1706091900/64-bit)
    Client Platform : Linux/X8664
    Install/Instance Path : /opt/ibm/db2/V11.1
    DB2DSDRIVER_CFG_PATH value: <not-set>
    db2dsdriver.cfg Path : /home/db2inst1/sqllib/cfg/db2dsdriver.cfg
    DB2CLIINIPATH value : <not-set>
    db2cli.ini Path : /home/db2inst1/sqllib/cfg/db2cli.ini
    db2diag.log Path : /home/db2inst1/sqllib/db2dump/db2diag.log
    ===============================================================================
    db2dsdriver.cfg schema validation for the entire file:
    ===============================================================================
    Success: The schema validation completed successfully without any errors.
    ===============================================================================
    The validation is completed.



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 3.  RE: ODBC Connection Setup on AIX environment with pureScale

    Posted 2 days ago

    Hi @Jan Nelken

    Thank you for the advice however now on the windows i managed to get a user connection string using the db2cli setup with the odbc connection

    eg.   DSN=FELIVE;UID=dbusr;PWD=********;PROTOCOL=TCPIP;INSTANCE=DB1INST1;CURRENTSCHEMA=DB2INST1;

    do i need to manually create an odbc file on windows with these details.



    ------------------------------
    jaison chipuka
    ------------------------------



  • 4.  RE: ODBC Connection Setup on AIX environment with pureScale

    Posted 2 days ago
    For purescale ACR (automatic client reroute) I would suggest steps I described before.