在恢復SQL Server的一個備份數據庫的時候報了一個錯誤,說:
RESTORE DATABASE must be used in single user mode when trying to restore the master database.
那么,我們應該怎么樣用單用戶模式(single user mode)啟動SQL Server呢?
Put the SQL Server into single-user mode via the command line. Execute the following from the BINN directory:
首先進入SQL Server的BINN路徑,比如 C:\Program Files\Microsoft SQL Server\MSSQL\Binn
然后在CMD下輸入:
sqlservr.exe -c -m
只要保持這窗口開著,SQL Server就在運行,不用了關閉即可了。