enter image description hereI just installed SQL server 2012 on Windows 2012 today. After the install, I changed the database settings to create database files in f:\mssql instead of the default. i verified the confired and running values.

Create database fails to create the .mdf and .log files with the following error - Directory lookup for the file "f:\msql\data\test.mdf' failed with os error 5. (Access is denied).

This error occurs when I run sql server service as domain account. The domain account is an administrator and has full control on volume F.

If I run the sql server service as local system, I am able to create the database with mdf files on f:\ drive.

My sysadmin confirms and I have verified that the domain account has full control on f:

I look forward to your suggestions.

closed as off-topic by Max Vernon, Paul White, RLF, Mark Storey-Smith, Shawn Melton Jan 2 '15 at 23:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Max Vernon, Paul White, RLF, Mark Storey-Smith, Shawn Melton
If this question can be reworded to fit the rules in the help center, please edit the question.

  • When did you add the service account to the security group? Before or after the SQL Server install? You may just need to restart the service so that it can update its token. – Nabil Becker Jan 31 '14 at 15:58
  • Thank you Nabil. I restarted sql server service multiple times after changing the property. I did not reboot the server though. It was the os team and I believe it was after the install. – TDPSQL_Newbie Jan 31 '14 at 16:02
  • Have you checked to make sure the "mssql" directory is inheriting permissions from the root of F drive? – Shawn Melton Jan 31 '14 at 16:05
  • Does the domain account have SysAdmin server role, or at least dbcreator and diskadmin? – Cougar9000 Jan 31 '14 at 17:04

This is now fixed. SQL Server can noow see the additional volumes besides. C:. It required applying this small changes and a server reboot. It turned out to be a VMWare HotAdd bug. Here is direct link to the VM Knowledge base article: http://kb.vmware.com/selfservice/microsites/search.dolanguage=en_US&cmd=displayKC&externalId=1012225


There is a sysinternal tool called Process Monitor (MS tool) http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx that it like a "packet capture" for Windows. No need to install it, just download and run on the server. It outputs a lot of information but has great filtering capabilities. 1. Start the capture 2. Run through the process of creating the new DB until you get the error 3. Stop the capture

Then filter out everything but SQL Server process and look for Access Denied. It might give you more ideas of why you're having issues.

  • Hi Denis, used the tool which led me to check other things. – TDPSQL_Newbie Jan 31 '14 at 17:49
  • Cool! Is there anyway to make your attached picture bigger? I cannot see anything on it. – DenisT Jan 31 '14 at 17:55
  • I seem to have hit a vmware bug. I have asked my sysadmin to check if the following is applicable. SQL Studio > Server > Properties > Database Settings > Default Locations > Browse - Does not show volume F:. Here is direct link to the VM Knowledge base article: kb.vmware.com/selfservice/microsites/… I will let you know if this solution works – TDPSQL_Newbie Jan 31 '14 at 18:01

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