SQL Server Error: 18456 Severity: 14 State: 12 Connection Error
Unable to Connect to SQL Server Due to Error: 18456, Severity: 14, State: 12
Table of Contents
Details:
SQL Server Error: 18456 Severity: 14 State: 12 or Error: 18456, Severity: 14, State: 12 Login failed for user ‘Username’ issue is caused by permissions issue. The following error appears in the SQL Server log:
Login failed for user 'Username'. Reason: Login-based server access validation failed with an infrastructure error. Check for previous errors. [Client: 10.0.0.1]
Error: 18456, Severity: 14, State: 12
Cause:
Error: 18456, Severity: 14, State: 12 means that the authentication is successful to the SQL Server but the server access fails due to permission issue. Below is resolution
Resolution or How to Fix this issue:
Need to ensure that the SQL Server Authentication mode is enabled for this login method to work.
Below are SQL commands to master database to give the permission to connect via TCP/IP for the User which should fix this issue
GRANT CONNECT SQL TO "Username"
GRANT CONNECT ON ENDPOINT::"TSQL Default TCP" TO "Username";