FileTable使用总结

sqlsever2012以后才开始支持FileTable,具体的FileTable的介绍可以参考微软的官网

http://msdn.microsoft.com/zh-cn/library/gg509097.aspx

启用FileTable也很简单,可以参考:

http://jimshu.blog.51cto.com/3171847/872715

与路径相关的几个函数使用

全路径的组成形式如下:

\<machine><instance-level FILESTREAM share><database-level directory><FileTable directory>

1,FileTableRootPath

USE MyDocumentDB;
-- returns “\MYSERVERMSSQLSERVERMyDocumentDB”
SELECT FileTableRootPath();

-- returns “\MYSERVERMSSQLSERVERMyDocumentDBMyFileTable”
SELECT FileTableRootPath(N'dbo.MyFileTable');

-- returns “\MYSERVERMSSQLSERVERMyDocumentDBMyFileTable”
SELECT FileTableRootPath(N'MyFileTable');
2,GetFileNamespacePath 参数中的1表示显示全路径 image 上图中数据库共享实例名为SqlFile,数据库共享文件夹名为ImageFile,表的文件夹名是DoucmentFile

3,GetPathLocator

注意,参数中要为全路径

image

原文地址:https://www.cnblogs.com/xiashengwang/p/4040244.html