cannot login SQL server after local window account re-created Error : 18456

calvin Lee 1 Reputation point
2021-05-26T14:16:11.713+00:00

I deleted the window local account. Even though I re-created the window account using the same name,
this re-created window account cannot login the SQL server 2012 thru the SQL server . Error : 18456

Anyone know how to fix ?

SQL Server Other
{count} votes

1 answer

Sort by: Most helpful
  1. Dan Guzman 9,401 Reputation points
    2021-05-26T18:53:47.35+00:00

    The login's Windows account SID, not the name, is used for authentication. A new SID is generated when a Windows account is recreated.

    You'll need to drop the login (and db users, if any) and re-add it. If you have no other account you can use for this operation, follow the steps detailed in Connect to SQL Server when system administrators are locked out.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.