Wednesday, May 18, 2016

Reset SQL Single User Mode

Sql Server -m is the parameter you would use to start SQL in single user mode.
There are a number of reasons why you would want to do this which we will explain later in the article, but first how to quickly get your SQL box into single user mode.
These examples are done using both SQL 2008 and SQL 2012.
Open up SQL Server Configuration Manager

Single User Mode SQL 2008

Right click on the SQL Server instance and select properties | Advanced
Add a semicolon and -m to the existing start up parameters (normally you will need to follow it with a semi colon)
E.g
sql server -m
Restart SQL

Single User Mode SQL 2012

Right click on the SQL Server instance and select properties | Startup Parameters
In the box that says Specify a startup parameter type in -m and click add.
SQL 2012 sql server -m
Restart SQL
To check the setting has applied try and add more than one connection. You should see an error like this.
single user mode

Why Use Single User Mode?

One of the more common reasons to use this command is if you need to restore the master database.
Personally I have had this happen, more than once and -m saved the day.
kakavn_85

No comments:

Post a Comment