SQL Flow Field Guide

DBCC FREESESSIONCACHE

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

DBCC FREESESSIONCACHE: administrative check or maintenance

What changes

Input
database, table, index, cache or server state named in the command
Output or change
messages or result sets; maintenance forms change storage, caches or metadata

Syntax at a glance

DBCC FREESESSIONCACHE [ WITH NO_INFOMSGS ]

Work example

A distributed query incident needs review of cached session connections.

Check provider connection state and test the effect in a lab before clearing cached sessions.

Check your work The intended connection is recreated and active remote work is not interrupted.

Open Microsoft Learn for full syntax, permissions, and details for your version.