SQL Server 2008 R2, error creating file for FileStream 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?
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.