sp_helpfilegroup (T-SQL)

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
name 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_helpfile
sp_attach_single_file_db System Stored Procedures
sp_detach_db  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.