Topic
  • 3 replies
  • Latest Post - ‏2019-01-15T05:59:47Z by VishDev2018
StevenofAustralia
StevenofAustralia
2 Posts

Pinned topic Connection string to connect to group

‏2019-01-09T05:01:48Z |

When using the .NET DB2 driver is it possible to connect to an Informix group like you can using ODBC?

What would the connection string look like?

The only multi host solutions that are documented use connection manager which is not implemented here.

 

  • VishDev2018
    VishDev2018
    64 Posts

    Re: Connection string to connect to group

    ‏2019-01-11T11:01:19Z  

    Hi,

     .NET connection string supports connection to a single server.  Can you please elaborate on Informix Group? Is it some type of Sysplex/HADR setup?

     

    Thanks

    Vishwa

      

  • StevenofAustralia
    StevenofAustralia
    2 Posts

    Re: Connection string to connect to group

    ‏2019-01-13T23:59:55Z  

    Yes, it is a HADR setup.

    Two servers dbserver1 and dbserver2. dbserver2 is being replicated to, and is in read only mode.

    Clients are configured to connect to group_name, and will fail over from dbname to dbname_dr automatically.

    Groups work for informix-sqli, JDBC and ODBC

    sqlhosts entries

    group_name    group           -                    -    i=201,e=dbname_dr
    dbname        onsoctcp        dbserver1            1542 g=group_name
    dbname_dr     onsoctcp        dbserver2            1542 g=group_name

     

    Windows sqlhosts reg entries example.

    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts]
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\group_name]
    "PROTOCOL"="group"
    "OPTIONS"="i=201"
    "HOST"="-"
    "SERVICE"="-"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\group_name\dbname]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\group_name\dbname_dr]
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\dbname]
    "HOST"="dbserver1"
    "SERVICE"="1542"
    "PROTOCOL"="olsoctcp"
    "OPTIONS"="g=group_name"
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\dbname_dr]
    "HOST"="dbserver2"
    "SERVICE"="1542"
    "PROTOCOL"="olsoctcp"
    "OPTIONS"="g=group_name"

  • VishDev2018
    VishDev2018
    64 Posts

    Re: Connection string to connect to group

    ‏2019-01-15T05:59:47Z  

    Yes, it is a HADR setup.

    Two servers dbserver1 and dbserver2. dbserver2 is being replicated to, and is in read only mode.

    Clients are configured to connect to group_name, and will fail over from dbname to dbname_dr automatically.

    Groups work for informix-sqli, JDBC and ODBC

    sqlhosts entries

    group_name    group           -                    -    i=201,e=dbname_dr
    dbname        onsoctcp        dbserver1            1542 g=group_name
    dbname_dr     onsoctcp        dbserver2            1542 g=group_name

     

    Windows sqlhosts reg entries example.

    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts]
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\group_name]
    "PROTOCOL"="group"
    "OPTIONS"="i=201"
    "HOST"="-"
    "SERVICE"="-"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\group_name\dbname]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\group_name\dbname_dr]
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\dbname]
    "HOST"="dbserver1"
    "SERVICE"="1542"
    "PROTOCOL"="olsoctcp"
    "OPTIONS"="g=group_name"
     
    [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\dbname_dr]
    "HOST"="dbserver2"
    "SERVICE"="1542"
    "PROTOCOL"="olsoctcp"
    "OPTIONS"="g=group_name"

    Hi,

     please contact IBM customer support for help on this. You may need to contact the Informix database team to get help on using their client SDK. The DB2 .NET provider is based on DRDA protocol and you may not be able to use it with your set up.

     

    Thanks

    Vishwa