---
title: "SQL Server Linked Server Connections Stay Open After October 2026 Windows Updates (Oracle, PostgreSQL)"
canonical: "https://techwiki.co.uk/databases/sql-server-linked-server-connections-remain-open-october-2026"
author: "Adam Birds"
article_type: "documentation"
published: "2026-12-02T23:08:11.662Z"
updated: "2026-12-02T23:08:11.662Z"
categories: ["Databases"]
tags: ["postgresql","sql-server","windows-server"]
---**Since the Windows updates of 13 October 2026, SQL Server linked server queries that use OLE DB providers can leave their connections to the external database open after the query finishes. The connections build up over time, which can exhaust session limits on the remote database and slowly degrade performance. Oracle and PostgreSQL linked servers are known to be affected.**

## Status

Microsoft lists this issue as **Confirmed** on Windows release health. A fix is planned for a future Windows update. Check the release health page for your OS before applying anything below. The November 2026 updates do not fix it.

Affected platforms:

- **Server:** Windows Server 2025, 2022, 2016, 2012 R2 and 2012, and Windows Server, version 1809.
- **Client:** Windows 11 (23H2 to 26H2), Windows 10 1809 and Windows 10 Enterprise LTSC 2019.

## Confirm the symptom

### On the SQL Server host

Count established connections from `sqlservr.exe` to the remote database ports. The examples below use 1521 for Oracle and 5432 for PostgreSQL; adjust them to your environment.

```powershell
$pids = (Get-Process sqlservr).Id
Get-NetTCPConnection -State Established |
  Where-Object { $_.OwningProcess -in $pids -and $_.RemotePort -in 1521,5432 } |
  Group-Object RemoteAddress, RemotePort | Select-Object Count, Name
```

A count that keeps rising while query volume stays steady points to this issue.

### On a PostgreSQL target

```sql
SELECT client_addr, state, count(*)
FROM pg_stat_activity
WHERE client_addr = '<sql-server-ip>'
GROUP BY client_addr, state;
```

### On an Oracle target

```sql
SELECT machine, status, COUNT(*)
FROM v$session
WHERE machine LIKE '%<sql-server-hostname>%'
GROUP BY machine, status;
```

## Workarounds

Microsoft's guidance:

- **Close idle connections manually** if you can identify them.
- **Restart the SQL Server service.** This also interrupts active queries and transactions, and the build-up returns after enough run time.
- **Contact Microsoft Support for business.** A mitigation is available for affected enterprise devices.

### Closing idle sessions on a PostgreSQL target

Close only sessions from the SQL Server host that have been idle for a while:

```sql
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE client_addr = '<sql-server-ip>'
  AND state = 'idle'
  AND state_change < now() - interval '30 minutes';
```

As a safety net, PostgreSQL 14 and later can close idle sessions automatically. Set this for the linked server's login role:

```sql
ALTER ROLE <linked-server-user> SET idle_session_timeout = '30min';
```

### Closing idle sessions on an Oracle target

List the inactive sessions from the SQL Server host, then kill them individually:

```sql
SELECT sid, serial#, last_call_et
FROM v$session
WHERE machine LIKE '%<sql-server-hostname>%' AND status = 'INACTIVE';

ALTER SYSTEM KILL SESSION '<sid>,<serial#>' IMMEDIATE;
```

An Oracle profile with an `IDLE_TIME` limit can do this automatically, but check how it fits your resource-limit settings first.

## Verify

After applying a workaround, re-run the connection count over a few hours and confirm it stays flat. Once Microsoft ships the fix, install it and remove any time-out settings you added only for this issue.

## Notes

- This is a Windows issue, not a SQL Server bug. Patching SQL Server will not fix it.
- Uninstalling the October update would also remove that month's security fixes, so it is not a recommended workaround.
