Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-619

[OLEDB] Cannot connect to shard DB by using OLEDB driver

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: OLEDB-9.2.0.0001
    • Fix Version/s: OLEDB-9.2.0.0001
    • Component/s: OLEDB
    • Labels:
    • Environment:
      • OS: Windows 7 32bit
      • CUBRID: 9.2.0.0111
      • OLEDB: cubrid-oledb 9.2.0 (2013-07-25)
      • .NET 4.0, VS 2010

      Description

      Similar as ODBC driver APIS-615, we can not connect to the CUBRID shard DB through OLEDB driver (with shard broker port)

      Test Code
      cubrid shard db configurations: see attachments

      {code}
      string strConn = @"Provider=CUBRID OLE DB Provider;Data Source=shard1;Location=10.34.64.57;User ID=dba;Port=36059;Charset=utf-8;";

      OleDbConnection connCubrid = new OleDbConnection();
      connCubrid.ConnectionString = strConn;
      connCubrid.Open();

      Console.WriteLine(connCubrid.State);

      connCubrid.Close();{code}

      Expected Result:

      Conection is open
      

      Acutual Result:

      System.Data.OleDb.OleDbException : A provider-specific error occurred
      
      1. cubrid_broker.conf
        2 kB
        Ray Yin
      2. shard_connection.txt
        0.5 kB
        Ray Yin
      3. shard_key.txt
        0.2 kB
        Ray Yin

        Activity

        Hide
        cn15800 谢韦华[Bert] added a comment -

        The error prompt by cubrid,you can find the error message in log/broker/proxy_log/shard1_1.log
        [ERR] ../../src/broker/shard_proxy_handler.c(740): Error returned. (client function, func_code:4, error:-1).
        Driver don't need to distinguish shard environment or common environment when create connection.

        Show
        cn15800 谢韦华[Bert] added a comment - The error prompt by cubrid,you can find the error message in log/broker/proxy_log/shard1_1.log [ERR] ../../src/broker/shard_proxy_handler.c(740): Error returned. (client function, func_code:4, error:-1). Driver don't need to distinguish shard environment or common environment when create connection.
        Hide
        ryin005 Ray Yin added a comment -

        I have tested all the drivers for the cubrid 9.2.0 shard db connection

        CCI, JDBC, PHP driver can connect with shard db successfully

        Python, Perl, PDO, ODBC, OLEDB driver cannot connect with shard db properly

        Show
        ryin005 Ray Yin added a comment - I have tested all the drivers for the cubrid 9.2.0 shard db connection CCI, JDBC, PHP driver can connect with shard db successfully Python, Perl, PDO, ODBC, OLEDB driver cannot connect with shard db properly
        Hide
        cn15800 谢韦华[Bert] added a comment -

        In sharding environment, when driver call function cci_get_db_parameter(CCI_PARAM_MAX_STRING_LENGTH), an error will be thrown by cci:
        -20004:Cannot communicate with server[CAS INFO - 10.34.64.218:36069, 1, 31236].
        So when cci_get_db_parameter(CCI_PARAM_MAX_STRING_LENGTH) return failed, ignore it.

        Show
        cn15800 谢韦华[Bert] added a comment - In sharding environment, when driver call function cci_get_db_parameter(CCI_PARAM_MAX_STRING_LENGTH), an error will be thrown by cci: -20004:Cannot communicate with server [CAS INFO - 10.34.64.218:36069, 1, 31236] . So when cci_get_db_parameter(CCI_PARAM_MAX_STRING_LENGTH) return failed, ignore it.
        Hide
        ryin005 Ray Yin added a comment -
        • Test OS: Win7 32bit (Client), Linux 64bit (Server)
        • CUBRID: 9.2.0.0128
        • Driver: cubrid-oledb 9.2.0.0001 (20130813)
        • Framework: .NET 4.0

        Test Result: Pass, the oledb can connect with CUBRID shard db correctly

        Close the issue

        Show
        ryin005 Ray Yin added a comment - Test OS: Win7 32bit (Client), Linux 64bit (Server) CUBRID: 9.2.0.0128 Driver: cubrid-oledb 9.2.0.0001 (20130813) Framework: .NET 4.0 Test Result: Pass, the oledb can connect with CUBRID shard db correctly Close the issue

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ryin005 Ray Yin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: