SQL Server 2008 R2, cant create a new DB

Fruitful picture Fruitful · May 3, 2011 · Viewed 22.1k times · Source

Having real problems creating a DB on my version of SQL Server 2008 R2 Express.

I've followed the links to the below but no info provided.

Thanks in advance for any help.

TITLE: Microsoft SQL Server Management Studio

Create failed for Database 'test'.
(Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


Directory lookup for the file "D:\DATA\test.mdf" failed with the operating system error 2 (failed to retrieve text for this error. Reason: 15100). CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (Microsoft SQL Server, Error: 5133)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=5133&LinkId=20476

Answer

IAmTimCorey picture IAmTimCorey · May 3, 2011

I would assume the issue has to do with the creation of the mdf file in your D:\Data folder. Can you verify that you have the permissions you need to that location and that you have enough free space? Also, be sure there isn't already an mdf file by that name at that location.