TechNet
Export (0) Print
Expand All

sys.sysfiles (Transact-SQL)

 

Contains one row for each file in a database.

System_CAPS_ICON_important.jpg Important


This SQL Server 2000 system table is included as a view for backward compatibility. We recommend that you use the current SQL Server system views instead. To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). 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.

Applies to: SQL Server (SQL Server 2008 through current version).
Column nameData typeDescription
fileidsmallintFile identification number unique for each database.
groupidsmallintFile group identification number.
sizeintSize of the file, in 8-KB pages.
maxsizeintMaximum file size, in 8-KB pages.

0 = No growth.

-1 = File will grow until the disk is full.

268435456 = Log file will grow to a maximum size of 2 TB.

Note: Databases that are upgraded with an unlimited log file size will report -1 for the maximum size of the log file.
growthintGrowth size of the database. Can be either the number of pages or the percentage of file size, depending on value of status.

0 = No growth.
statusintStatus bits for the growth value in either megabytes (MB) or kilobytes (KB).

0x2 = Disk file.

0x40 = Log file.

0x100000 = Growth. This value is a percentage and not the number of pages.
perfintReserved.
namesysnameLogical name of the file.
filenamenvarchar(260)Name of the physical device. This includes the full path of the file.

Mapping System Tables to System Views (Transact-SQL)
Compatibility Views (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft