How to bring SQL Server Instance in Single user mode and Connect as Single User

1) Go to SQL Server configuration Manager and click on respective instance. In my case it is SQL Server default instance.
2)Right click on Properties go to "Start Up Parameters" and "Specify a Startup Parameter" and in that window type "-m" and click on Add button.Then that parameter will appear under "Existing Parameters" as shown below.




3) Click on "Ok" and message will pop up as restart the services here. Ensure that "SQL Server Agent is also stopeed before you are connectin to SQL Server instance.
4) After restarting the sql server service through stop and start try to connect "SQL Server Management Studio". Here please observe few points carefully
a) Go to run and give value "ssms" and " SQL Server Management studio will appear like below. And follow the below instructions
b) DONT CLICK ON CONNECT button now. Instead click on "CANCEL" button. After that click on "New Query" Window


c) If you click on "New Query" window again same "Connect Server" window appears again this time you click on Connect. THEN ONLY You can connect to "SQL Server Instance" in a "Single User Mode"

d) Now you access the server in a "Single user mode". If you directly click on Connect button instead of Cancel and Newquery. It will connect through "SQL Server Object Explorer" and if you are trying to access new query it will alawys show error as " Alrady one user is connected" and you are not allowed




Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server