Blog Post

SQL Server Blog
1 MIN READ

ODBC Driver 18.4 for SQL Server Released

DavidEngelMS's avatar
DavidEngelMS
Icon for Microsoft rankMicrosoft
Aug 01, 2024

Version 18.4 of the Microsoft ODBC Driver 18 for SQL Server has been released. Version 18.4 brings some minor changes and fixes to the driver.

 

Added

Fixed

  • Fix crashes when receiving invalid data from server
  • Fix sending of null data for fixed-length types using DAE
  • Fix 10-minute delay upon disconnection after timeout
  • Fix memory leak upon disconnection when an error occurs
  • Fix memory leak upon reconnection with Strict encryption
  • Fix intermittent crash when connecting with Strict encryption and TLS 1.3
  • Fix crashes under low-memory conditions

 

Next steps

For Windows installations, you can directly download the Microsoft ODBC Driver 18 for SQL Server.

Linux and macOS packages are also available. For installation details see the online instructions.

 

David Engel

Published Aug 01, 2024
Version 1.0
  • GaryN52's avatar
    GaryN52
    Copper Contributor

    Where is SQL_COPT_SS_LONGASMAX defined and/or what is it's value expected by ODBC Driver 18 for SQL Server?

     

    Although the SQL_COPT_SS_LONGASMAX connection attribute (along with the LongAsMax connection string keyword) is documented in "DSN and Connection String Keywords and Attributes" (https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-2016) going back to SQL Server 2016, the SQL_COPT_SS_LONGASMAX attribute is not defined even in the newest Windows 10.0.26100 SDK's odbcss.h file.

  • GaryN52 

     

    SQL_COPT_SS_LONGASMAX is only available with the Microsoft ODBC Driver 18 for SQL Server. It's not available in earlier versions of the driver that have shipped with SQL Server. You can find SQL_COPT_SS_LONGASMAX defined in the msodbcsql.h include file under C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\180\SDK\Include when you install the optional "ODBC Driver for SQL Server SDK" component during installation.

     

     

    Regards,

    David

  • GaryN52's avatar
    GaryN52
    Copper Contributor

    DavidEngelMS 

     

    Thanks! That's a bit unexpected, but I was able to get the include file.

    Unlike other attribute settings (e.g. SQL_COPT_SS_WARN_ON_CP_ERROR) there are no definitions for Yes and No (e.g. SQL_WARN_YES & SQL_WARN_NO) and the documentation says only Yes & No. I'm guessing that it follows the pattern of other YES & NO defines that are 1L & 0L respectively so we'll give that a go and try it out.

  • LHWDTG's avatar
    LHWDTG
    Copper Contributor

    DavidEngelMS 

     

    Any chance of dropping IE in favor of the default system browser for interactive Entra ID authentication to support FIDO2/Passkeys/WHfB in the next release? I think SSMS did something similar awhile back.

  • LHWDTG There is a good chance. ODBC uses a shared library under the covers that handles Entra ID authentication. We are switching to a newer library in the near future (don't have a date). I'll have to confirm if it supports passkeys.

     

    Regards,

    David

  • mthorulsley's avatar
    mthorulsley
    Copper Contributor

    Hi,

     

    Do you have more information on this fix, what exactly was the issue and what was the resolution?

    • Fix 10-minute delay upon disconnection after timeout

    thanks

    • ajzh's avatar
      ajzh
      Copper Contributor

      Hi,

      Am using the 18.4 version but have an issue which sounds a lot like the "Fix 10-minute delay upon disconnection after timeout" that is fixed in this version.   Would also be interested in more details.

      Thanks

  • mthorulsley

     

    The issue was on Linux only. There was a leaked packet reference on a socket read timeout path that caused the delay down the line when cleaning up objects on disconnect. This particular timeout path would not commonly be hit but would be very noticeable on disconnect, if you did. The fix was simply to ensure the reference was properly released.

     

    Regards,

    David