I am using Filetable in SQL 2016. let's take a look at some select commands below:
1.
Select [stream_id] from <FileTable>
2.
Select [stream_id], [name] from <FileTable> with (nolock)
3.
Select [Stream_id], [name], file_stream.GetFileNamespacePath(0) as ntfsPath from <FileTable> with (nolock)
I must use with(nolock)
. if some one has opened a file such as a word document and I don't use 'NOLOCK', SQL returns only some records and then caught in a specific record and wouldn't return any records afterward. However number 1 and 2 return result but number 3 does not because of file_stream.GetFileNamespacePath(0)
. If I omit file_stream.GetFileNamespacePath(0)
then SQL returns a result. Whats the problem with GetFileNamespacePath()
?
Do I missed something in filestream configuration or use of Select
command ?