SQL Flow Field Guide

DBCC CHECKFILEGROUP

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

DBCC CHECKFILEGROUP: 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 CHECKFILEGROUP [ [ ( { filegroup_name | filegroup_id | 0 } [ , NOINDEX ] ) ] [ WITH { [ ALL_ERRORMSGS | NO_INFOMSGS ] [ , TABLOCK ] [ , ESTIMATEONLY ] [ , PHYSICAL_ONLY ] [ , MAXDOP = number_of_processors ] } ] ]

Work example

A filegroup restore or storage incident needs a focused consistency check.

Confirm filegroup scope and database state, then compare the result with the restore record.

Check your work Every checked file is consistent or has a named recovery action.

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