Подія
31 бер., 23 - 2 квіт., 23
Найбільший навчальний захід SQL, Fabric і Power BI. 31 березня – 2 квітня. Щоб заощадити 400 грн, скористайтеся кодом FABINSIDER.
Реєструйтеся сьогодніЦей браузер більше не підтримується.
Замініть його на Microsoft Edge, щоб користуватися перевагами найновіших функцій, оновлень безпеки та технічної підтримки.
Applies to:
SQL Server
Returns the names and attributes of filegroups associated with the current database.
Transact-SQL syntax conventions
sp_helpfilegroup [ [ @filegroupname = ] N'filegroupname' ]
[ ; ]
@filegroupname is sysname, with a default of NULL
.
The logical name of any filegroup in the current database. @filegroupname is sysname, with a default of NULL
. If @filegroupname isn't specified, all filegroups in the current database are listed and only the first result set shown in the Result Sets section is displayed.
0
(success) or 1
(failure).
Column name | Data type | Description |
---|---|---|
groupname |
sysname | Name of the filegroup. |
groupid |
smallint | Numeric filegroup identifier. |
filecount |
int | Number of files in the filegroup. |
If @filegroupname is specified, one row for each file in the filegroup is returned.
Column name | Data type | Description |
---|---|---|
file_in_group |
sysname | Logical name of the file in the filegroup. |
fileid |
smallint | Numeric file identifier. |
filename |
nchar(260) | Physical name of the file including the directory path. |
size |
nvarchar(15) | File size in kilobytes. |
maxsize |
nvarchar(15) | Maximum size of the file. This is the maximum size to which the file can grow. A value of UNLIMITED in this field indicates that the file grows until the disk is full. |
growth |
nvarchar(15) | Growth increment of the file. This value indicates the amount of space added to the file every time new space is required.0 = File is a fixed size and doesn't grow. |
Requires membership in the public role.
The following example returns information about the filegroups in the AdventureWorks2022
sample database.
USE AdventureWorks2022;
GO
EXEC sp_helpfilegroup;
GO
The following example returns information for all files in the PRIMARY
filegroup in the AdventureWorks2022
sample database.
USE AdventureWorks2022;
GO
EXEC sp_helpfilegroup 'PRIMARY';
GO
Подія
31 бер., 23 - 2 квіт., 23
Найбільший навчальний захід SQL, Fabric і Power BI. 31 березня – 2 квітня. Щоб заощадити 400 грн, скористайтеся кодом FABINSIDER.
Реєструйтеся сьогодні