[SQL] Login failed for user 'XXX'(18456)

18456 的錯誤,目前遇到兩種可能

先開ERRORLOG來看(SQL2017)

1. Reason:Password didn't match that for the login provided --->密碼打錯

2.Reason:An attempt to login using SQL authentication failed.Server is confiured for Integrated authentication only

--->只有SQLServer及Windows驗證模式才行(所謂的混合驗證模式authentication mode is MIXED),去檢查SQLServer伺服器驗
--->但,詭異的是 如果該帳號的登入被停用,也是出前述相同Server is confiured for Integrated authentication only,檢查一下帳戶

記得更改驗證模式後,重新啟動SQLserver服務