Login failed for WINDOWS Administrator login. (Microsoft SQL Server, Error: 18456)

  • Hi All,

    I am using SQL server 2008. While adding SQL user i unknowingly deleted the SQL authentication user from SQL server. Now the problem is i can not login with Windows Authentication neither i can login as "sa" user as this user is disabled. Please suggest me how to get in to SQL server management studio. Database is up and running but i can not access the database any more after doing this blunder.

    Please suggest me how to recover SQL instance,

    Thank you.

  • Just a guess, Try the DAC.

    http://www.mssqltips.com/tip.asp?tip=1005

  • DAC is what I'd use as well to re-enable this.

  • Connect to sql server in single user mode..

    net start mssqlserver /c /m /t3604

    sqlcmd -E

    create a new sql login and give SA right

    Hope this might help

  • I have a doubt here????????????????????

    Sql Server does't allow you to dalete your own login when you are logged into the server.

    then how come all this Magic happened.

    if you were using any other id while u accidently deleted the admin id , that id should also have the admin rights to do so, so please try logging in with that id and recreate the login with admin rights.

  • Excellent catch Ananth..

    Will wait for his explanation πŸ™‚

  • I too agree with Ananth. Can u explain how u did that. πŸ™‚

  • Dear Friends,

    You can delete your own login when you are logged in 2008. It throws below error.

    β€œDeleting server login does not delete the database user associated with logins and blaa blaa..….. ”

    Once you close the existing connection to DB instance, you will not be able to login into SQL server instance as reported above

    To overcome this issue, you can perform the below steps.

    1. Add domain user on the MSSQL server box and assign him local admin privileges.

    2. Login to DB server with the newly added domain user account

    a. Stop the MSSQL server - NET STOP MSSQLSERVER

    b. Start MSSQL server in single user mode NET START MSSQLSERVER /M

    3. Disable MSSQL server agent (Else it will connect to MSSQL server and you won’t able to connect)

    4. Login into MSSQL server management studio (with the user account recently created)

    5. Enable SA account or recreate domain user which you deleted accidently.

    6. Restart MSSQL server and Agent services

    7. Log off and login with user ID which you accidently deleted.

    8. Have fun πŸ™‚

    - SAMJI
    If you marry one they will fight with you, If you marry 2 they will fight for you πŸ™‚

  • COOL_ICE,

    U sure that u can delete an SQL login from SQL Server 2008??

  • COOL_ICE,

    I tried to delete SQL Login while i Loged in, but its not deleting. Can u tell me how u do this.

    Thanks,

    Omeswar Danwada.

  • Right click on Expand security -> Logins ->Right click on the domain user account -> Delete

    This action will throw information/confirmation window as shown in attachment

    Once you click on OK, it will delete logged in domain user account.

    - SAMJI
    If you marry one they will fight with you, If you marry 2 they will fight for you πŸ™‚

  • I also did the same thing, But my question when we login with say for example 'Login1' account and is it possible to delete the same Login 'Login1'. You said it is possible, but when i try i m grtting following error as in attachment.

  • Yes… Now I understood your issue. From the screenshot, I can make it out that you are logging as SQL user but not as Domain user (Eg: Domainname\Username)

    Try logging in as domain user with trusted connection you will be able to delete your own account.

    - SAMJI
    If you marry one they will fight with you, If you marry 2 they will fight for you πŸ™‚

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply