Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
FILEGROUPPROPERTY (Transact-SQL)

FILEGROUPPROPERTY (Transact-SQL)

 

Applies To: SQL Server 2014, SQL Server 2016 Preview

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

Applies to: SQL Server (SQL Server 2008 through current version).

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.

Value

Description

Value returned

IsReadOnly

Filegroup is read-only.

1 = True

0 = False

NULL = Input is not valid.

IsUserDefinedFG

Filegroup is a user-defined filegroup.

1 = True

0 = False

NULL = Input is not valid.

IsDefault

Filegroup is the default filegroup.

1 = True

0 = False

NULL = Input is not valid.

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)

Community Additions

ADD
Show:
© 2015 Microsoft