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 11: FileTable<strong>The</strong>re has been a change to the PathName() function in <strong>SQL</strong> <strong>Server</strong> 2012 to supportAvailability Groups, a new feature in the latest release. Any discussion <strong>of</strong> AvailabilityGroups is beyond the scope <strong>of</strong> this book, but PathName() now has a second optionalargument that determines whether the returned name should be the virtual networkname (VNN) (default) or the computer name.Catalog and Dynamic Management ViewsThree new catalog management views and one new DMV have been added to <strong>SQL</strong> <strong>Server</strong>2012. One catalog view has been updated to support FileTable.sys.tables<strong>The</strong> sys.tables catalog view has been updated to include the is_FileTable column.A value <strong>of</strong> 1 in the is_FileTable column indicates that the table is a FileTable.sys.database_filestream_optionsWe have already used this catalog view in Listing 11-9 to check the readiness <strong>of</strong> a databasefor FileTable creation. <strong>The</strong> view includes four columns.• database_id – <strong>The</strong> ID <strong>of</strong> the database within the <strong>SQL</strong> <strong>Server</strong> instance. This is usefulfor filtering by a particular database.You can retrieve the ID <strong>of</strong> a database using the DB_ID() function.• directory_name – <strong>The</strong> database-level directory name for all FileTables within thedatabase. If this value is NULL, a database-level directory has not been set and thedatabase cannot contain FileTables.426

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

Saved successfully!

Ooh no, something went wrong!