DBCC CHECKFILEGROUP in Microsoft SQL Server

Checks the allocation and structural integrity of all tables in file group in SQL Server

Checks the allocation and structural integrity of all tables (in the current database) in the specified file group.

Syntax:

DBCC CHECKFILEGROUP
( [ { 'filegroup' | filegroup_id } ]
[ , NOINDEX ]
)

Executing DBCC CHECKFILEGROUP statements on all filegroups in a database is the same as running a single DBCC CHECKDB statement. The only difference is that any table with indexes on different filegroups has the table and indexes checked multiple times (one time for each filegroup holding the table or any of its indexes).

Examples
A. Check the PRIMARY filegroup in the pubs database
This example checks the pubs database primary filegroup.

USE pubs
GO
DBCC CHECKFILEGROUP
GO

B. Check the pubs PRIMARY filegroup without nonclustered indexes
This example checks the pubs database primary filegroup (excluding nonclustered indexes) by specifying the identification number of the primary filegroup, and by specifying the NOINDEX option.

USE pubs
GO
DBCC CHECKFILEGROUP (1, NOINDEX)
GO

Leave a Reply