SQL FileTable GetFileNamespacePath

試著忘記壹切 提交于 2019-12-08 12:18:58

问题


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 ?

来源:https://stackoverflow.com/questions/46428281/sql-filetable-getfilenamespacepath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!