Forum Discussion

Aman_Susanto's avatar
Aman_Susanto
Copper Contributor
Jun 24, 2024
Solved

login failed for user sa sql server 2022 on windows server 2022

i got the login failed error for user sa, but not always

so I went to server properties - security - server authentication

change to windows authentication mode

and change again to sql server and windows authentication mode, and restart sql server. this happened when i upgraded to sql 2022,

I have Service Pack 13 installed, can anyone help?

  • olafhelper's avatar
    olafhelper
    Jun 25, 2024
    The first "error" (which is only an issue, not an error) is related to Windows authentication, not to SQL logins.

    And the second error is clear, isn't it? If you have a password policy in place and someone enters several times a wrong password, the "sa" login may gets locked.

4 Replies

  • olafhelper's avatar
    olafhelper
    Bronze Contributor
    Lookup SQL Server ErrorLog file for more details about failed logon/error number
    • Aman_Susanto's avatar
      Aman_Susanto
      Copper Contributor
      this is from error log :
      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/WIN-H0R6PI7B1GU ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.

      Login failed for user 'sa'.Reason: The account is currently locked out. The system administrator can unlock it. [CLIENT: 192.168.10.177]
      2024-06-24 15:06:14.12 Logon Error: 18456, Severity: 14, State: 8.
      2024-06-24 15:06:14.12 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: 49.43.2.83]

      • olafhelper's avatar
        olafhelper
        Bronze Contributor
        The first "error" (which is only an issue, not an error) is related to Windows authentication, not to SQL logins.

        And the second error is clear, isn't it? If you have a password policy in place and someone enters several times a wrong password, the "sa" login may gets locked.

Resources