FILEGROUPPROPERTY (Transact-SQL)

FILEGROUPPROPERTY (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns the specified filegroup property value when supplied with a filegroup and property name.

Topic link icon Transact-SQL Syntax Conventions

  
FILEGROUPPROPERTY ( filegroup_name , property )  

filegroup_name
Is an expression of type sysname that represents the name of the filegroup for which to return the named property information.

property
Is an expression of type varchar(128) contains the name of the filegroup property to return. property can be one of these values.

ValueDescriptionValue returned
IsReadOnlyFilegroup is read-only.1 = True

0 = False

NULL = Input is not valid.
IsUserDefinedFGFilegroup is a user-defined filegroup.1 = True

0 = False

NULL = Input is not valid.
IsDefaultFilegroup is the default filegroup.1 = True

0 = False

NULL = Input is not valid.

int

filegroup_name corresponds to the name column in the sys.filegroups catalog view.

This example returns the setting for the IsDefault property for the primary filegroup in the AdventureWorks2012 database.

  
SELECT FILEGROUPPROPERTY('PRIMARY', 'IsDefault') AS 'Default Filegroup';  
GO  

Here is the result set.

Default Filegroup   
---------------------   
1  
  
(1 row(s) affected)  

FILEGROUP_ID (Transact-SQL)
FILEGROUP_NAME (Transact-SQL)
Metadata Functions (Transact-SQL)
SELECT (Transact-SQL)
sys.filegroups (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft