how to add a user to sql server without using sql sever management studio RRS feed

  • Question

  • Hi,

    This is Anil i am bit new to sql server. i installed sql server in my server and by default i added Administrator user while installation then i created a domain on the same server. i logged in to server using the same user(Administrator). then unexpectedly i deleted the same user from sql server. now i am unable to connected to sql server. i dont have any other users to connect. 

    can any one please give me any solution to add the same user sql server and login.

    Thanks in advance.


    Sunday, February 23, 2014 10:52 AM


  • Hi,

    If you do not have any user then you need to start your SQL server in single user mode with -M and you can add yourself back. Try to follow the instructions at here for that: http://archive.msdn.microsoft.com/addselftosqlsysadmin

    Anyway, it is not a best practice to create domain controller from SQL server. that must be on a separate servers.

    I hope it helps.


    There are 10 type of people. Those who understand binary and those who do not.

    My Blog | Hire Me

    Sunday, February 23, 2014 11:18 AM
  • SQL Server documentation topic Troubleshooting: Connecting to SQL Server When System Administrators Are Locked Out

    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty

    • Proposed as answer by Olaf HelperMVP Monday, February 24, 2014 4:59 PM
    • Marked as answer by tracycai Friday, February 28, 2014 2:10 PM
    Monday, February 24, 2014 4:12 PM

All replies