Export (0) Print
Expand All

FILEGROUPPROPERTY (Transact-SQL)

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.

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 AdventureWorks2008R2 database.

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


Here is the result set.

Default Filegroup 
--------------------- 
1

(1 row(s) affected)
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft