Loading Now

Microsoft JDBC Driver 13.6 for SQL Server is now available

The latest version of the Microsoft JDBC Driver 13.6 for SQL Server is now available, designed to enhance the performance of Java applications. This update means you can get more out of your current infrastructure, efficiently diagnose latency issues, improve essential connection paths, and leverage the newest features found in both SQL Server and Azure SQL.

Version 13.6 includes everything from the previous 13.5 preview cycle, alongside final touches to compatibility, security, performance, and quality for general use. Existing applications will still follow the established JDBC programming model, but developers can now take advantage of the new features if they choose to.

If you handle…

You’ll benefit from…

Large, wide, or heavy numeric queries

Reduced allocation and garbage collection work in reading ResultSets

High-concurrency parameterised tasks

New parameter length hints that help minimise oversized memory grants in SQL Server

Always Encrypted with secure enclaves

Caching Column Encryption Key lookups to limit remote key-store calls

Production performance monitoring

Nanosecond timing alongside SQL, statement, application, and pool context

Azure SQL Hyperscale reader endpoints

Automatic routing to designated read replicas with the correct database context

Vector, JDK 26, or cross-driver migrations

Improved vector validation, support for JDK 26, and more flexible connection strings

When it comes to application-scale data access performance, even minor costs in highly used paths repeat for every value in each row. With Driver 13.6, we’ve reduced unnecessary allocations and work in several commonly used paths:

  • Faster ResultSet processing for normal synchronous reads.
  • DECIMAL, NUMERIC, MONEY, and SMALLMONEY decoding creates fewer temporary objects.
  • Common string and BigDecimal operations eliminate intermediary allocations.
  • Driver API entry and exit logging skips unnecessary work when detailed logging isn’t needed.

These improvements are automatic—your application doesn’t need a new connection property or code adjustments to see the benefits. Workloads that deal with large, wide, or dense numeric ResultSets will notice less stress on garbage collection and more steady performance.

We’ve also enhanced performance for Always Encrypted with secure enclaves. Enclave queries will now reuse Column Encryption Keys through the driver’s built-in symmetric key cache, cutting down on network round trips for the same key during repeated executions. For setups that utilise Azure Key Vault or other remote key stores, this update will decrease latency and help avoid key-store throttling under heavy load.

When it comes to prepared statements, they can be efficient on the client side yet still request more server memory than necessary. If the driver is unsure about the expected length of a varchar, nvarchar, char, nchar, varbinary, or binary parameter, it might declare a type definition much larger than what your application usually employs. This can lead to SQL Server estimating row size based on this inflated width, resulting in oversize memory grants.

With Driver 13.6, applications can provide parameter length hints using:

  • SQLServerPreparedStatement.defineParameterType(int parameterIndex, int sqlType, int maxLength)
  • Existing setObject overloads that take scaleOrLength

Having accurate length details can minimise oversized memory grants, freeing up more workspace memory for concurrent queries and improving overall throughput during the simultaneous execution of many parameterised statements.

These two APIs address different requirements: defineParameterType enforces a parameter definition when the application’s requirements are known, while setObject length gives a suggestion for supported character and binary types. If a value surpasses the length hint, the driver will expand the definition rather than truncate data. Applications that skip providing a hint will continue functioning as before.

The performance logging callback has been improved to deliver more context needed to delve into latency in real-world settings:

  • Optional nanosecond timing for precise measurements
  • The current SQL text
  • The statement type currently being executed
  • The application name linked to the connection

The callback continues to use millisecond timing as default, with new methods ensuring compatibility with existing callback setups.

This additional context assists telemetry systems in addressing practical queries like: Which pool or application generated the event? Was the operation a prepared statement or something else? What SQL was running when delays arose due to authentication, network issues, request setup, or server responses?

Security enhancements cover various areas such as authentication, encryption, XML processing, class loading, Java Naming and Directory Interface (JNDI), Bulk Copy, and dependencies:

  • Tighter validation for Always Encrypted secure enclave attestation.
  • Sensitive connection properties are not included when a SQLServerDataSource is converted to a JNDI Reference.
  • Secure processing, document type definition, and external entity protections are applied throughout the SQLXML parser routes.
  • Validation of configured Java binary class names prior to reflective class loading.
  • Escape multipart destination identifiers before incorporating them into Bulk Copy and useBulkCopyForBatchInsert SQL.
  • Enhanced security on the ActiveDirectoryInteractive authentication callback flow.
  • Updates to optional Bouncy Castle, Azure Identity, Azure Key Vault, and Netty dependencies to include security and reliability fixes.

These changes lower the risk in common enterprise integration points, all while maintaining established configuration settings for valid applications.

Driver 13.6 also introduces improved routing for Azure SQL Hyperscale reader endpoints, allowing the driver to negotiate this capability, follow routing details to named read replicas, and remember the correct database context during reconnections.

This means applications can leverage reader endpoints for read scale-out without needing to manually direct traffic to specific replicas. The server can manage new connections across named replicas, while the driver takes care of the required network targets and database names for routed connections. For servers lacking enhanced routing, existing connection behaviours remain unchanged.

Managed Identity connections have become more robust as well. If a cached Managed Identity or default credential fails to obtain a token, the driver will discard that failed credential. This allows for fresh credential creation during the next connection attempt, enabling recovery without needing a restart of the application or Java virtual machine.

Support for SQL Server and Azure SQL vector capabilities is steadily increasing in Driver 13.6. New features include negotiated version validation when applications transmit vector columns via table-valued parameters. The driver checks the server’s vector capability before sending vector metadata or data, ensuring unsupported versions and the FLOAT16 type generate clear driver errors early in the process. This helps applications achieve more predictable outcomes for tasks involving embeddings, vector searches, and retrieval-augmented generation, especially in diverse environments with various vector capabilities.

Since teams often share configurations across different tools, languages, or frameworks, Driver 13.6 now recognises additional case-insensitive connection string aliases utilised by other Microsoft data drivers:

Alias

JDBC property

uid

user

trusted_connection

integratedSecurity

app

applicationName

connectTimeout

loginTimeout

columnEncryption

columnEncryptionSetting

quotedId

quotedIdentifier

All previously used JDBC property names remain functional. These aliases simplify configuration adjustments when applications transition to JDBC or share settings across Microsoft’s SQL connectivity suite.

We’ve continued to support the established microsoft.sql.DateTimeOffset type and kept the existing getDateTimeOffset, setDateTimeOffset, and updateDateTimeOffset APIs free from deprecation notes. Standard JDBC getObject(…, OffsetDateTime.class) support is still available.

This release also enhances compatibility and diagnostics in numerous areas visible to developers:

  • getGeneratedKeys() will return an empty ResultSet when no generated key is produced on an insert, instead of a row with NULL.
  • Calling methods related to parameters on a closed prepared or callable statement will yield the standard closed-statement SQLServerException rather than a NullPointerException.
  • Repeated metadata discovery avoids unnecessary failed sp_columns_170 calls on servers that do not support that procedure.
  • Socket, I/O, and custom access-token callback errors will maintain their original cause chains.
  • Android applications using Conscrypt will no longer freeze during affected TLS login paths.

Driver 13.6 also introduces build and test support for JDK 26. The jre11 artifact supports Java 11 and future versions, including JDK 26, while Java 8 applications can continue using the jre8 artifact.

For users of Java 11 and above, please add the following dependency:


com.microsoft.sqlserver
mssql-jdbc
13.6.0.jre11

For Java 8 applications, use version 13.6.0.jre8.

Be sure to download the release and check out the complete list of changes:

Download Driver 13.6 and test it with your application’s key data access paths.

Share this content:


Discover more from Qureshi

Subscribe to get the latest posts sent to your email.

Discover more from Qureshi

Subscribe now to keep reading and get access to the full archive.

Continue reading