看起来您没有权限写入您指定的文件夹。
您需要确保服务帐户SQL Server在您尝试写入的文件夹路径上具有写权限。
编辑:
使用以下步骤:
//SqlExpress
1.Click the Windows Start button, and then click Run. The Run dialog box appears.
2.Type Services.msc into the Open field, and then click OK. The Services
panel appears:
3.Right-click the SQL Server (SqlEx[ress) service, and then click Properties from the shortcut menu. The SQL Server (SqlExpress) Properties (Local Computer) dialog box appears:
4.On the Log On tab, select Local System account for the Log on as option.
5.Press Apply and then press OK on the dialog box that appears.
6.Click on the General tab and then press Stop the stop the service, and Start to restart the SqlExpress service.
7.Press OK and close the services Console.
8.Launch SqlExpress and attempt to now restore the database.
该文件夹不存在。没有D:开车说。无论如何,我想改变默认位置。 – CodeSlave 2014-12-01 16:40:13
如果您指向不存在的目录,则可能会出现此错误。您可以在SQL Server Management Studio中查看和更改此设置。右键单击服务器,选择“属性”,然后选择“数据库设置”页面(使用现有文件夹)。 – 2014-12-01 16:48:28
你可以尝试通过重新启动SQL服务来创建吗? – 2014-12-01 16:57:25