Monday, June 27, 2011

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 Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn 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:\DATA\tempdb.mdf') alter database tempdb move file (filename=templog, FileName ='C:\DATA\templog.ldf')

No comments:

Post a Comment