use master go exec sp_configure 'filestream access level', 2 go reconfigure go alter database AdventureWorksLT2008 add filegroup [fg_filestream] contains filestream go alter database AdventureWorksLT2008 add file ( name = 'file_tream_01' , filename = 'c:\filestream' ) to filegroup [fg_filestream] go ALTER DATABASE AdventureWorksLT2008 SET FILESTREAM ( NON_TRANSACTED_ACCESS = FULL , DIRECTORY_NAME = N'File_Dir') WITH NO_WAIT go
use AdventureWorksLT2008; create table dbo.file_table_sample as filetable with ( filetable_directory = 'file_table_sample' , filetable_collate_filename = database_default )
select name, file_stream.GetFileNamespacePath(), is_directory from dbo.file_table_sample
select FileTableRootPath() + file_stream.GetFileNamespacePath() AS FilePath from dbo.file_table_sample