EnumFiles Method (Database)
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The EnumFiles method returns a QueryResults object that enumerates the operating system files used to implement Microsoft SQL Server database storage.
Syntax
object
.EnumFiles( )
as
QueryResults
Parts
- object
Expression that evaluates to an object in the Applies To list.
Prototype (C/C++)
HRESULT EnumFiles(
LPSQLDMOQUERYRESULTS* ppResults);
Returns
A QueryResults object that contains one result set defined by these columns.
Column |
Data type |
Description |
---|---|---|
fileid |
smallint |
System-generated identifier of the operating system file. |
filename |
nchar(261) |
Operating system name of the file. |
groupid |
smallint |
System-generated identifier of the filegroup that contains the operating system file. 0 for files implementing transaction log storage. |
growth |
integer |
Growth factor. When file grows by a fixed percentage, the value is the percentage multiplied by 100. When the file grows by a fixed size increment, the increment is expressed as a number of pages. |
maxsize |
integer |
Maximum size if set, -1 if no maximum specified. |
name |
nchar(129) |
Logical name of the operating system file. |
perf |
integer |
Reserved. |
size |
integer |
Size of the file expressed as number of pages contained. For an instance of SQL Server version 7.0, a page is 8,192 bytes. |
status |
integer |
Bit-packed flag value that indicates creation or other attributes as described in Remarks. |
Remarks
The status column of the returned result set is a bit-packed value. Interpret the status column using these values.
Value |
Description |
---|---|
1 |
Reserved. |
2 |
Operating system file maintains database data. |
64 |
Operating system file maintains transaction log records. |
128 |
Operating system file has been written to after the most recent backup. |
16384 |
Operating system file implicitly created as part of database creation or alteration. |
32768 |
Operating system file explicitly created as part of database creation or alteration. |
1048576 |
File growth value is interpreted as a percentage. |