TASTE-OF-IT

MS SQL Management Studio Login failed for User 18456

Logo Microsoft

offizielles Logo von Microsoft

Nach einem Inplace Upgrade von MS Server 2008R2 auf 2012 R2 und final auf 2016, konnte sich ein Domainuser nicht mehr mittels MS SQL Server Management Studio an der Datenbank anmelden. Der Fehler lautete: Cannot connect to server. Login failed for user (Microsoft SQL SErver, Error: 18456)

Um einen detaillierten Fehler zu erhalten, kann man im Errorlog nachsehen:

C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG

Dort ist dann zu sehen:

Error: 18456, Severity: 14, State: 11.

Hier interessant ist der State: 11. Ein Blick in die Dokumentation von Microsoft: https://docs.microsoft.com/de-de/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error?view=sql-server-ver15 listet alle State und ihre mögliche Ursache auf:

StateDescription
1Error information is not available. This state usually means you do not have permission to receive the error details. Contact your SQL Server administrator for more information.
2User ID is not valid.
5User ID is not valid.
6An attempt was made to use a Windows login name with SQL Server Authentication.
7Login is disabled, and the password is incorrect.
8The password is incorrect.
9Password is not valid.
11Login is valid, but server access failed. One possible cause of this error is when the Windows user has access to SQL Server as a member of the local administrators group, but Windows is not providing administrator credentials. To connect, start the connecting program using the Run as administrator option, and then add the Windows user to SQL Server as a specific login.
12Login is valid login, but server access failed.
18Password must be changed.
38, 46Could not find database requested by user.
58When SQL Server is set to use Windows Authentication only, and a client attempts to log in using SQL authentication. Another cause is when SIDs do not match.
102 – 111AAD failure.
122 – 124Failure due to empty user name or password.
126Database requested by user does not exist.
132 – 133AAD failure.

Unter State 11 ist der Hinweis, das Management Studio als Administrator auszuführen:

MS SQL Studio Run as Admin

Das war dann auch die Lösung und die Anmeldung funktionierte wieder.

Have Funn ..

Die mobile Version verlassen