SQL Server 2019 - unable to create filestream database on ReFs file system

Copper Contributor

I'm trying to create a filestream database on ReFs.

I keep getting the following error:


Unable to open the physical file "c:\....\db\FileStream". Operating system error -1073740577: "0xc00004df(failed to retrieve text for this error. Reason: 317)".


Anyone knows what could be the problem?

4 Replies



Hi, Dalibor.


It sounds like your database service account does not have sufficient file system access, or you're trying to access it using an SQL login rather than a Windows login, which is what error 317 typically indicates.





I can create other databases in the same folder (and have done so) without any issues. I've also set the ACL to Everyone - Full control and it did not help.
Only the creation of FileStream file fails for some reason.
Make sure the sql service account has all rights to the disk. I don’t believe this is an issue related to ReFS .
See my previous comment. I've managed to created FILESTREAM databases on custom folders on NTFS without any issues. Only ReFS is failing. It is probably some sort of a security issue. I believe that probably some defaults when creating folders are differnet from ReFS and NTFS. SQL server creates the folder successfully (the FILESTREAM folder is actually created and left as an orphan when the operation fails) but then it fails working with the content of the ReFS.
Unfortunately I can not report this issue to MS so it will remain unsolved.