看起來您沒有權限寫入您指定的文件夾。
您需要確保服務帳戶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