codebrothers.net :: Home  >  Matthias Denkmaier
User: Guest  Login
Matthias Denkmaier
C# - what else?
Blog search:  
How to: Switch SQL Server 2005 to single user mode

Here is a short tutorial on switching a SQL Server 2005 instance to single user mode:

 

1. Stop the service:

 

  Using a command prompt type: net stop MSSQL$<your_instanceName>

 

2. Start the service in single user mode:

 

  Using a command prompt type: net start MSSQL$<your_instanceName> /m

 

3. Do all of your your stuff using the only available connection...

 

4. Stop the service again

 

5. Start the service again

 

Using a command prompt type: net start MSSQL$<your_instanceName> but this time without the /m parameter

 

Note: To get all currently opened connections you could execute the following query:

SELECT * FROM sys.dm_exec_Connections

 

Share this post: Email it!
Posted:  4/23/2007 5:17:41 PM  by  mdenkmaier
Tags:  SQLHow to
No comments, yet!
Leave a Comment

Name required

Your URL

Comments (required)