Solved

SQL can't create files on drive d or e

Posted on 2011-02-22
4
1,433 Views
Last Modified: 2012-06-27
Hello,

When trying to create a database on our new SQL server ( with drive d set for data and e for log files ) I get the following message:

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 'D:\SQLDatabases\test.mdf'.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (Microsoft SQL Server, Error: 5123)

Outside of SQL we can create files in the relevant folders. It makes no difference if I login using windows or SQL authentication.  Also when trying to restore files from d or e SQL does not show the files in the browse window.

Thanks




0
Comment
Question by:Petermcg001
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34950039
if this is a cluster node, D: and E: must be on the same cluster resource ..
if not, still, D: and E: must not be mapped (network) drives.

please clarify
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 34950056
>> Outside of SQL we can create files in the relevant folders. It makes no difference if I login using windows or SQL authentication.

Check whether the startup account of SQL Server has permissions on D: drive in order to create database with files on D: drive..
Also check whether it is a mapped network drive as mentioned above..
0
 
LVL 1

Author Comment

by:Petermcg001
ID: 34950088
Hi,

It was the account issue, it had been set to use the network service.  I changed it to local system and it's fine now.

It's interesting that the account had access to c but not d or e.

Thanks for your help.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 34950246
Welcome..
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question