# What changed in mssql

> 64 changes in mssql 11 to 12 from its official release notes, upgrade guides and advisories: 7 breaking, 4 security, 7 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/mssql/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## mssql 12

### Breaking changes

- Requests are rejected when their errors do not end the batch. (12.7.5) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.5)
- Adds support for tedious 20 and removes the TVP schema workaround. (12.7.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.0)
- Node.js >=18.19.0 is now required to use this release. (12.4.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.4.0)
- Prepared-statement tracing channels are now nested under the ps namespace. (12.4.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.4.0)
- The msnodesqlv8 driver now treats bigint as a string. (12.2.3) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.2.3)
- Removes the default value from the CLI flag, so the TDS version is no longer supplied by default. (12.1.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.1.0)

### Security

- Unconvertible parameter values are rejected without leaking the connection. (12.7.4) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.4)
- Validates parameter names against an allowlist. (9.1.4 … 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)
- Rejects column names that break out of quoted identifiers. (9.1.4 … 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)
- Rejects type metadata that escapes the parameter declaration. (9.1.4, 10.0.5, 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)

### New APIs and options

- Requests can now set their own requestTimeout instead of relying only on the configured timeout. (12.5.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.5.0)
- The CHANNELS constant is exported from the public API so developers can access diagnostics channel names. (12.4.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.4.0)
- Connection creation, destruction, and abort now emit diagnostics events. (12.4.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.4.0)
- Adds a socket-level pool validation mode. (12.3.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.3.0)
- You can provide a specific config.driver for msnodesqlv8. (12.2.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.2.0)
- Adds the --tds-version flag to the CLI so developers can specify the TDS version. (12.1.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.1.0)
- Prepares the tedious connection pool to receive tdsVersion, allowing the TDS version to be passed through. (12.1.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.1.0)

### Behavior and default changes

- Tracing channel coverage now includes the callback API. (12.4.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.4.0)

### Fixes and other changes

- begin() and prepare() reject with ECONNCLOSED when the pool is not connected. (12.7.9) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.9)
- begin() and prepare() reject with ENOCONN when there is no pool. (12.7.9) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.9)
- msnodesqlv8 bulk loads no longer swallow exceptions thrown by their callback. (12.7.9) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.9)
- msnodesqlv8 bulk loads settle when no connection can be acquired. (12.7.8) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.8)
- A request's callback is called once when it throws. (12.7.8) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.8)
- The connection is released when msnodesqlv8 throws while starting a request. (12.7.8) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.8)
- Streams now complete when an error ends the batch. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- Streams no longer lose rows under back pressure. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- Streams resumed after ending no longer hang the connection. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- The connection is returned when an msnodesqlv8 transaction fails to begin. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- A piped request is released when its destination fails. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- The destroy of a pooled tedious connection that has already closed is now published. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- Request errors are passed to the destination of Request.pipe(). (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- A request resumes when its readable stream is destroyed. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- The connection is returned when a transaction fails to begin. (12.7.7) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.7)
- Fixed bulk loading created tables and Xml columns on tedious. (12.7.6) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.6)
- Cancelled requests, including paused streams, are reported as ECANCEL. (12.7.5) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.5)
- Bulk loads settle when the table lookup fails. (12.7.5) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.5)
- Errors from commit and rollback are reported. (12.7.5) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.5)
- Requests keep every preceding error, so developers can inspect all errors from an msnodesqlv8 request. (12.7.5) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.5)
- A terminated statement is rejected with its own error. (12.7.5) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.5)
- Sets output parameter initial values in msnodesqlv8 requests. (12.7.3) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.3)
- Binds msnodesqlv8 procedure parameters in marker order. (12.7.3) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.3)
- Passes max lengths to tedious as a number. (12.7.3) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.3)
- Removes request listeners when a request is abandoned before it is sent. (9.1.4 … 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)
- Stops bulk insert from continuing after an invalid table name. (9.1.4 … 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)
- Releases the connection when bulk load options are rejected. (9.1.4 … 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)
- Validates bulk ordering keys. (9.1.4 … 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)
- Validates stored procedure names. (9.1.4 … 12.7.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v10.0.5), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.3.3), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.2.2), [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v9.1.4)
- The close() callback is invoked only once while the pool is connecting. (12.7.1) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.7.1)
- Prevents a TypeError in batches with output parameters when SQL errors occur. (12.5.5) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.5.5)
- Preserves originalError on EABORT TransactionError instances. (12.5.4) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.5.4)
- Boolean connection string options are now parsed correctly. (12.5.3) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.5.3)
- Prevents a TypeError when executing a prepared statement with streaming enabled and no callback. (12.5.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.5.2)
- Passes dataLength to getMssqlType during valueCorrection, fixing the reported issue. (12.5.1) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.5.1)
- Geography and geometry parsing is more robust. (12.4.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.4.0)
- POOL_CLOSE is emitted when pool destruction fails, and the event includes the reason. (12.4.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.4.0)
- Listeners are cleaned up when batch parameter validation fails, avoiding listener leaks. (12.3.1) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.3.1)
- Listeners are cleaned up when an execute parameter error occurs, avoiding listener leaks. (12.3.1) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.3.1)
- An error is cleared when sql_variant is used in TVP columns. (12.3.1) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.3.1)
- Errors from msnodesqlv8 are now reported as the actual error given by the driver. (12.2.3) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.2.3)
- Includes the schema in the TVP type declaration for sp_executesql. (12.2.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.2.2)
- ConnectionError is now instantiated with appropriate arguments. (12.2.1) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.2.1)
- ConnectionError rendering is improved, making the error clearer to developers. (12.1.1) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.1.1)
- Reverts resolveConfig to its previous options-spread behavior, which may affect how configuration options are resolved. (12.1.0) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v12.1.0)

## mssql 11

### Breaking changes

- Rejects type metadata that escapes a parameter declaration. (11.0.2) — [release notes](https://github.com/tediousjs/node-mssql/releases/tag/v11.0.2)
