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

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

    Details

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

      Description

      • Brief: we can not connect to the CUBRID shard DB through ODBC driver (with shard broker port)
      • Test Code
        cubrid shard db configurations: see attachments
      {code}
      [Test, Description("Test for connection between ODBC and Shard DB")]
      public void OdbcShard_Connection()
      {
      // Open Shard Connection
      string strConn = @"Driver={CUBRID Driver};db_name=shard1;uid=dba;pwd=;server=10.34.64.57;port=36069;fetch_size=100";
      OdbcConnection connCubrid = new OdbcConnection(strConn);
      connCubrid.Open();
      Assert.AreEqual(ConnectionState.Open, connCubrid.State);
      connCubrid.Close();
      }{code}

      Expected Result: connection is opened

      Connection is opened
      

      Actual Result: an OdbcException, without any error message

      System.Data.Odbc.OdbcException : 
      
      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
        ryin005 Ray Yin added a comment -
        • Test OS: Win7 32bit (Client), Linux 64bit (Server)
        • CUBRID: 9.2.0.0128
        • Driver: cubrid-odbc 9.2.0.0001 (20130813)
        • Framework: .NET 4.0

        Test Result: Pass, the odbc 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-odbc 9.2.0.0001 (20130813) Framework: .NET 4.0 Test Result: Pass, the odbc 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: