sp_helpfilegroup

Transact-SQL Reference

Transact-SQL Reference

sp_helpfilegroup

Returns the names and attributes of filegroups associated with the current database.

Syntax

sp_helpfilegroup [ [ @filegroupname = ] 'name' ]

Arguments

[@filegroupname =] 'name'

Is the logical name of any filegroup in the current database. name is sysname, with a default of NULL. If name is not specified, the attributes of all filegroups in the current database are listed.

Return Code Values

0 (success) or 1 (failure)

Result Sets
Column name Data type Description
groupname sysname Name of the file group.
groupid smallint Numeric group identifier.
filecount integer Number of files in the file group.
Permissions

Execute permission defaults to the public role.

Examples

This example returns information about the filegroups in pubs.

USE pubs
EXEC sp_helpfilegroup

See Also

sp_attach_db

sp_attach_single_file_db

sp_detach_db

sp_helpfile

System Stored Procedures