Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

unable to create database Expand / Collapse
Author
Message
Posted Wednesday, October 07, 2009 7:51 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 07, 2009 11:22 AM
Points: 2, Visits: 2
Hi all,

I am unable to create a new database.

When I try to execute, create database test;
The following errors are encountered..

Directory lookup for the file "F:\SQLData\test.mdf" failed with the operating system error 2(The system cannot find the file specified.).

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.


The path, i.e. F:\SQLData\test.mdf is not the original. I changed it to the F:\ directory manually using the properties( I changed the default locations for Data and Log in Properties-> Database Settings).

Could this be the reason?


Regards,

Abhi
Post #799171
Posted Wednesday, October 07, 2009 7:58 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 1:02 AM
Points: 1,322, Visits: 4,404
If the folder you are trying to use is the root folder where SQL Server was installed, have a quick look in Explorer... you may find it's marked as read only.


Post #799178
Posted Wednesday, October 07, 2009 10:02 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 4:08 PM
Points: 38,099, Visits: 30,392
Does the directory F:\SQLData exist?
Does the SQL Service account have full rights to it?
Is this a clustered SQL Server?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #799332
Posted Wednesday, October 07, 2009 11:27 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 07, 2009 11:22 AM
Points: 2, Visits: 2
Hi guys,

Thank you all for the help.

Although I created that F:\ path long time back, it wasn't created yet. I replaced that path with the original one where all the database and log files are stored.

It is working good now. Was able to create the database and further tables as well.


Regards,

Abhi
Post #799389
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse