FILEGROUPPROPERTY (Transact-SQL)
Applies to: SQL Server Azure SQL Managed Instance
This function returns the filegroup property value for a specified name and filegroup value.
Transact-SQL syntax conventions
Syntax
FILEGROUPPROPERTY ( filegroup_name, property )
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
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 AdventureWorks2022 database.
SELECT FILEGROUPPROPERTY('PRIMARY', 'IsDefault') AS 'Default Filegroup';
GO
Here is the result set.
Default Filegroup
---------------------
1
(1 row(s) affected)
See Also
FILEGROUP_ID (Transact-SQL)
FILEGROUP_NAME (Transact-SQL)
Metadata Functions (Transact-SQL)
SELECT (Transact-SQL)
sys.filegroups (Transact-SQL)
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho