| title | FILEGROUPPROPERTY (Transact-SQL) | Microsoft Docs | ||||
|---|---|---|---|---|---|
| ms.custom | |||||
| ms.date | 03/03/2017 | ||||
| ms.prod | sql-non-specified | ||||
| ms.reviewer | |||||
| ms.suite | |||||
| ms.technology |
|
||||
| ms.tgt_pltfrm | |||||
| ms.topic | language-reference | ||||
| f1_keywords |
|
||||
| dev_langs |
|
||||
| helpviewer_keywords |
|
||||
| ms.assetid | b3a930e6-df05-4034-929c-f681f5f6fc6e | ||||
| caps.latest.revision | 22 | ||||
| author | BYHAM | ||||
| ms.author | rickbyh | ||||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]
Returns the specified filegroup property value when supplied with a filegroup and property name.
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. |
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 [!INCLUDEssSampleDBnormal] database.
SELECT FILEGROUPPROPERTY('PRIMARY', 'IsDefault') AS 'Default Filegroup';
GO
[!INCLUDEssResult]
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)