適用於:SQL Server
徵兆
如果Microsoft SQL Server 服務無法在啟動期間建立 Tempdb 檔案,則服務在使用 Service Control Manager 時不會啟動,而且您會收到下列錯誤訊息:
Windows 無法在本機計算機上啟動 SQL Server (MSSQLSERVER)。 如需詳細資訊,請檢閱系統事件記錄檔。
如果這是非Microsoft服務,請連絡服務提供者,並參考服務特定的錯誤碼 1814。
原因
此問題可能會因為下列原因而發生:
- 裝載 Tempdb 的硬碟已移除,或因某些原因而變更驅動器號。
- OS 層有空間限制。
解決方法
開啟應用程式記錄檔,並確認您看到類似下列的錯誤訊息專案:
Log Name: Application Source: MSSQLSERVER Date: <Datetime> Event ID: 5123 Task Category: Server Level: Error Keywords: Classic User: N/A Computer: <Server name> Description: CREATE FILE encountered operating system error 3(The system cannot find the path specified.) while attempting to open or create the physical file <FilePath>. Log Name: Application Source: MSSQLSERVER Date: <Datetime> Event ID: 17204 Task Category: Server Level: Error Keywords: Classic User: N/A Computer: <Server name> Description: FCB::Open failed: Could not open file <FilePath> for file number 1. OS error: 3(The system cannot find the path specified.). Log Name: Application Source: MSSQLSERVER Date: <Datetime> Event ID: 1814 Task Category: Server Level: Information Keywords: Classic User: N/A Computer: <Server name> Description: Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the operating system error log that may indicate why the tempdb files could not be initialized.若要解決此問題,請使用移動系統資料庫的失敗復原程式一節中所述的程式,將Tempdb檔案移至不同的位置。