Via the Failover Cluster Manager, I recently added a new disk to an existing SQL Server 2008 R2 Cluster, running on Windows Server 2012 R2.

When attempting to create a database on this new storage, I get the following error:

Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file 'J:\DATA\mydatabase.mdf'.
Msg 1802, Level 16, State 4, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
  1. I can manually add a file to J:\data

  2. The new storage can be moved between nodes without any errors

  3. The SQL Server Service Account has full control over the entire J:\ drive

  4. The SQL Server Service Account has full control over the J:\DATA Here is a layout of the drive, you will notice that DATA is a seperate volume mounted inside J:\

enter image description here

Can someone please help me figure out why I am getting this error?


From James, if I add a subdirectory to data, then the create database command works

  • 1
    Is Data a mount point on J? If so I think you will need to set permissions inside the mount point to allow the SQL service account access. – James Anderson Jun 17 '15 at 8:44
  • Hi @JamesAnderson, yes the service account has full control over the mount point. – Craig Efrein Jun 17 '15 at 8:46
  • Have you tried tracing sqlservr.exe with ProcMon? Maybe some more info is available there. – spaghettidba Jun 17 '15 at 8:50
  • So if you look at a file/folder in the 'data' mount point does the sql account have the access you expect? – James Anderson Jun 17 '15 at 8:51

Operating system error 5 is a simple Access is denied you can always check those errors in the command prompt net helpmsg 5.

Now Volume mount points are sometimes a bother. In Windows server 2000 the calcs.exe had an error and could not set the permissions on the underlying drive and the only way to do it was to mount the volume using a drive letter, set permissions on the root folder and then create a mountpoint.

Later versions of windows should be able set the permissions on the mountpoint by using the /M switch so that

cacls j:\data /g DOMAIN\ACCOUNT:f /M /E

Will grant the domain\account full permissions on the root of the drive mounted at j:\data, I still haven't leard to do this with icacls.exe and a comment how to do so will be well appriciated.

As you have found out creating a subfolder on the mount point makes it possible for you to create an accesslist for that folder but there still seem to be issues with setting permissions on the root folder of the drive using the GUI.

Usually I dont bother with the calcs command and if I need to set permissions on the root I'll add a driveletter, set the permissions using the GUI and then remove the drive letter.

| improve this answer | |

There was a problem with the System Volume Information Folder which is a hidden folder at the root of this volume.

enter image description here

On other volumes on the same machine, this protected volume was accessible after being made visible in Folder Options

enter image description here

I could not however access the System Volume Information folder of the DATA directory that I was attempting to create databases in.

Steps taken to resolve by our Windows Admin

  1. A new Drive letter T: was created

  2. The contents of the J: drive was copied into it

  3. The J: Drive was destroyed and the T: drive was changed to the J: drive in Windows.

After which, I was able to create databases normally.

Thanks to @jamesanderson for sending me on the right path.

| improve this answer | |

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.