how to set a network path for filestream filegroup

。_饼干妹妹 提交于 2020-01-25 04:34:06

问题


How to configure a database so that filestream data is stored on a non local path?

To enable filestream at db level I do first:

ALTER DATABASE MyDatabase ADD
FILEGROUP FileStreamFileGroup CONTAINS FILESTREAM;
GO

Then:

ALTER DATABASE MyDatabase ADD FILE (
       NAME = MyDatabaseFileStreamFile,
       FILENAME = 'c:\Test')
TO FILEGROUP FileStreamFileGroup ;
GO

Now instead of

c:\Test

I want to set a network path, for example:

\\Fileserver\Test

but this doesn't work:

ALTER DATABASE MyDatabase ADD FILE (
       NAME = MyDatabaseFileStreamFile,
       FILENAME = '\\Fileserver\Test') -- THIS IS NOT ACCEPTED
TO FILEGROUP FileStreamFileGroup ;
GO

How to achieve the desired result?


回答1:


This is not supported. Although filestream data may be accessed remotely by clients, it must be local with respect to the Sql Server instance hosting it.



来源:https://stackoverflow.com/questions/3187855/how-to-set-a-network-path-for-filestream-filegroup

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