SQL Server 2008 R2,无法创建新数据库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5870826/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 10:23:06  来源:igfitidea点击:

SQL Server 2008 R2, cant create a new DB

sqlsql-server-2008r2-express

提问by Fruitful

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

在我的 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

标题:Microsoft SQL Server 管理工作室

为数据库“测试”创建失败。
(Microsoft.SqlServer.Smo)

如需帮助,请单击: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=创建+数据库&LinkId=20476

附加信息:

执行 Transact-SQL 语句或批处理时发生异常。(Microsoft.SqlServer.ConnectionInfo)


文件“D:\DATA\test.mdf”的目录查找失败,出现操作系统错误 2(无法检索此错误的文本。原因:15100)。创建数据库失败。无法创建列出的某些文件名。检查相关错误。(Microsoft SQL Server,错误:5133)

如需帮助,请单击:http: //go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=5133&LinkId=20476

回答by IAmTimCorey

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.

我认为问题与在 D:\Data 文件夹中创建 mdf 文件有关。您能否验证您是否拥有该位置所需的权限以及是否有足够的可用空间?另外,请确保该位置还没有该名称的 mdf 文件。

回答by Ziv.Ti

open the DB properties and on the files page (on the right panel) make sure that you dont have database files with duplicate names. if there are change their names

打开数据库属性并在文件页面(在右侧面板上)确保您没有具有重复名称的数据库文件。如果有改变他们的名字