SQL Flow Field Guide

DBCC CHECKALLOC

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

DBCC CHECKALLOC: 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 CHECKALLOC [ ( database_name | database_id | 0 [ , NOINDEX | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ] ) [ WITH { [ ALL_ERRORMSGS ] [ , NO_INFOMSGS ] [ , TABLOCK ] [ , ESTIMATEONLY ] } ] ]

Work example

An incident review needs a focused check of database allocation structures.

Use a restored copy or approved diagnostic window and compare reported allocation errors with the error log.

Check your work The command reports no allocation errors or the incident records each affected object.

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