Returns the names and attributes of filegroups associated with the current database.
sp_helpfilegroup [ [ @filegroupname = ] 'name' ]
[@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.
0 (success) or 1 (failure)
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. |
Execute permission defaults to the public role.
This example returns information about the filegroups in pubs.
USE pubs
EXEC sp_helpfilegroup