Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 2.63 KB

File metadata and controls

83 lines (61 loc) · 2.63 KB
title FILEGROUPPROPERTY (Transact-SQL)
description FILEGROUPPROPERTY returns the filegroup property value for a specified name and filegroup value.
author markingmyname
ms.author maghan
ms.reviewer randolphwest
ms.date 06/05/2025
ms.service sql
ms.subservice t-sql
ms.topic reference
f1_keywords
FILEGROUPPROPERTY_TSQL
FILEGROUPPROPERTY
helpviewer_keywords
filegroups [SQL Server], property values
FILEGROUPPROPERTY function
viewing filegroup properties
displaying filegroup properties
dev_langs
TSQL

FILEGROUPPROPERTY (Transact-SQL)

[!INCLUDE SQL Server Azure SQL Managed Instance]

This function returns the filegroup property value for a specified name and filegroup value.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

FILEGROUPPROPERTY ( filegroup_name , property )

Arguments

filegroup_name

An expression of type sysname that represents the filegroup name for which FILEGROUPPROPERTY returns the named property information.

property

An expression of type varchar(128) that returns the name of the filegroup property. Property can return one of these values:

Value Description Value returned
IsReadOnly Filegroup is read-only. 1 = TRUE

0 = FALSE
NULL = Invalid input.
IsUserDefinedFG Filegroup is a user-defined filegroup. 1 = TRUE

0 = FALSE
NULL = Invalid input.
IsDefault Filegroup is the default filegroup. 1 = TRUE

0 = FALSE
NULL = Invalid input.

Return types

int

Remarks

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

Examples

This example returns the IsDefault property setting for the primary filegroup in the [!INCLUDE sssampledbobject-md] database.

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

[!INCLUDE ssResult]

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

Related content