1

I'm trying to create a file to add to a filestream file group and I get the error:

Msg 5120, Level 16, State 106, Line 1
Unable to open the physical file "d:\data\filestreamstore.mdf". Operating System Error -1073741790: "0xc0000022(failed to retrieve text for this error. Reason: 15105)".

I am running the query connection as administrator and I have full privileges on the drive and folder in question.

In the ERROR log I see:

Error: 17207, Severity 16, State:1.
STREAMFCB::Startup: Operating system error 0xc0000022(failed to retrieve text for this error. Reason: 15105) occurred while createing or opening file 'd:\data\filestreamstore.mdf'. Diagnose and correct the operating system error, and retry the operation.
Error: 17204, Severity 16, State 1.
FCB::Startup () failed: Could not open file d:\data\filestreamstore.mdf for file number 65537. OS errof: 0xc0000022(failed to retrieve text for this error. Reason: 15105)

These identical errors are found in the Application log, with no more details.

Has anyone seen this before?

  • Your query connection is not really relevant; the operation is being performed by the SQL Server service account. What is the SQL Server service account? (You can check this in Services or SQL Server Configuration Manager.) – Aaron Bertrand Aug 6 '14 at 18:04
  • The SQL service account is a local account which has full rights to the drive and directory -- it was able to create the database and log files, it's just having issues with the filestream. – Snowburnt Aug 6 '14 at 18:28
  • Filestream creates a folder, not a file, which is subtly different but different. Are you really doing this in d:\data\ or has that been scrubbed for security reasons or are you trying to do this in the root of a drive (where UAC is likely to give you fits)? Have you tried logging in manually as the local account and creating that folder manually? – Aaron Bertrand Aug 6 '14 at 18:39
  • it's been scrubbed for security, but it's not in the root of a drive. Can I create the folder manually? – Snowburnt Aug 6 '14 at 19:06
  • No, I'm saying if you log in as the local account SQL Server is running as, and try to create any folder manually in that same location, does it work? If not, maybe you'll get a more helpful error message? – Aaron Bertrand Aug 6 '14 at 19:08
1

Turned out to be an HBSS issue. Typically, I would have had this turned off during install but the environment I'm working with is particularly secured where you can't have HBSS set to "learning mode."

it turns out that filestream creates a registry key for each directory created and these exceptions have to be in place before creating the filestream enabled "file".

HBSS stands for Host Based Security System. Ours is a McAfee product. It's an incredibly powerful tool that is unrelated to SQL server, but on systems that require it, you will encounter strange problems like this with little to no explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.