How to add deleted user in sql server? I have set up sql server 2008 in windows server 2008 r2 and it works fine. However, I have deleted the my user from logins in the sql server accidentally and now I cannot find a way to log in to the sql server and I believe I did not set up any other user well. Think of it as I just installed and removed the user.

Is there anyway that I can add an account?
You can try below alternatives:


If you installed SQL Server then you will be having "sa" - if mixed mode authentication is enabled. You can use "sa" account to create a login and map that login to a database.
Alternatively, you can use "DAC" (if you have enabled it as a part of post installation step).
By default, BUILTIN\Administrators has access to sql server 2008 instance. If you are part of BUILTIN\Administrators group then you will have access.
Last resort : Recover access to a SQL Server instance by Aaron Bertrand wherein he shows how to use PsExec to get into sql server.


Once you gain access to sql server, then create a login and map that login to a database. 

Make sure to NOT delete it again :-)