在恢复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就在运行,不用了关闭即可了。