Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sysfiles

 

Also see sys.master_files




Syntax
CREATE VIEW sys.sysfiles AS
	SELECT
		fileid = convert(smallint, fileid & 0x7fff),
		groupid = convert(smallint, grpid),
		size = isnull(FilePropertyById(fileid, 'size'), size),
		maxsize, growth,
		status = convert(int,
					case filetype when 1 then 66 else 2 end  -- x_eft_SQLLog, FCB_LOG_DEVICE, FCB_DSK_DEVICE
					+ (status & 8) * 2 -- FCB_READONLY_MEDIA
					+ (status & 16) * 256 -- FCB_READONLY
					+ case filestate when 6 then 268435456 else 0 end -- OFFLINE, FCB_OFFLINE
					+ (status & 256) * 2097152 -- FCB_SPARSE_FILE
					+ (status & 32) * 32768), -- FCB_PERCENT_GROWTH
		perf = convert(int, 0),
		name = lname,
		filename = pname
	FROM sys.sysprufiles
	WHERE dbfragid = 1
		AND filetype IN (0, 1) -- x_eft_SQLData, x_eft_SQLLog (bwkcmpt types)
		AND filestate NOT IN (1, 2, 3) -- x_efs_Dummy, x_efs_Dropped, x_efs_DroppedReusePending

 
Last revision 2008RTM
See also

  sp_check_removable (Procedure)
sp_copysubscription (Procedure)
sp_dropdistributiondb (Procedure)
sp_helpdb (Procedure)
sp_helpfile (Procedure)
sp_helpfilegroup (Procedure)
sp_MSscriptdb_worker (Procedure)
sp_spaceused (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash