Posted on Leave a comment

Starting SQL Server in Maintenance Mode

Open a command prompt and run the commands below (note: your path to the Binn folder may vary) to switch on the SQL Server with minimal configuration single user mode:

cd C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLBinn

sqlservr.exe -f

This can be useful in cases where the SQL Server will not start in normal mode due to something like the partition the tempdb is on becomes unavailable. If something like this happens can start in single user mode and execute the following:

alter database tempdb move file (filename=tempdev, FileName =’C:DATAtempdb.mdf’)
alter database tempdb move file (filename=templog, FileName =’C:DATAtemplog.ldf’)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.