DBCC CHECKFILEGROUP in Microsoft SQL Server

DBCC CHECKFILEGROUP

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s