17.07.2015 Views

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 11: FileTableColumn Namecached_file_sizecreation_timelast_write_timelast_access_timeis_directoryColumn Description<strong>The</strong> size <strong>of</strong> the file in bytes. This is a computedcolumn. It uses the DATALENGTH() T-<strong>SQL</strong> functionto calculate the file size.<strong>The</strong> Books Online documentation notes that, inunusual circumstances, the value <strong>of</strong> this column canget out <strong>of</strong> sync. <strong>The</strong> T-<strong>SQL</strong> DATALENGTH() functionwill always return the correct file size in bytes.<strong>The</strong> date and time the file was created, which can beset by Windows APIs.Like the next two "_time" fields below, it is stored asa datetime2(4) value, which means the time zone<strong>of</strong>fset is included in the value.<strong>The</strong> date and time the file contents were last updated.Like creation_time and last_access_time, thisvalue can also be set by Windows APIs and thus maynot reflect the actual time.<strong>The</strong> date and time the file contents were last accessed.Just like this metadata attribute on the NTFS filesystem, it is important to note that it would beaccessing an application that is responsible forupdating this value. Many applications do notchange this value when opening a file.Indicates if the row refers to a folder instead <strong>of</strong> a file.SampleValue(s)NULL for folders≥ 0 for files0 for files1 for folders390

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!