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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 9: Investigating <strong>FILESTREAM</strong> Databasessys.system_internals_partitionsThis is another internal view that contains some <strong>FILESTREAM</strong>-related information. Twocolumns that are relevant to the <strong>FILESTREAM</strong> feature are filestream_filegroup_idand filestream_guid. filestream_filegroup_id refers to the filegroup ID <strong>of</strong> the<strong>FILESTREAM</strong> filegroup.Again, Books Online warns that this view is reserved for the internal system usageonly and future compatibility is not guaranteed. Personally, however, I found this viewvery helpful and have used it a number <strong>of</strong> times to retrieve various pieces <strong>of</strong> informationrelated to the location <strong>of</strong> the <strong>FILESTREAM</strong> folders (see, for example, Listings 9-10and 9-11).sys.filestream_tombstone_*This is an internal table that the <strong>FILESTREAM</strong> feature uses to keep track <strong>of</strong> the garbagefiles. When a garbage file is generated, it is recorded in this table and the garbage collectorreads information from the tombstone table and cleans the garbage based on it.A detailed explanation <strong>of</strong> this table is provided in Chapter 7.Useful <strong>FILESTREAM</strong> Metadata QueriesWhile working with <strong>FILESTREAM</strong>-enabled databases, you might very <strong>of</strong>ten come acrosscases where you need to query the <strong>FILESTREAM</strong> metadata to retrieve information. Thissection provides some <strong>FILESTREAM</strong> metadata queries, using many <strong>of</strong> the system catalogviews discussed previously, which you might find very helpful.335

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

Saved successfully!

Ooh no, something went wrong!