Unable to Connect to SQL Server Due to Error: 18456, Severity: 14, State: 12
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
The following error appears in the SQL Server log:
Login failed for user 'confuser'. Reason: Login-based server access validation failed with an infrastructure error. Check for previous errors. [Client: 127.0.0.1] Error: 18456, Severity: 14, State: 12
The following appears in the
atlassian-confluence.log
:2013-02-25 15:09:44,445 ERROR [http-8090-2] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] getTestDatabaseConnection Could not successfully test your database: -- referer: http://<confluence-url>/setup/setupstandarddb-start.action?database=mssql | url: /setup/setupstandarddb.action | userName: anonymous | action: setupstandarddb java.sql.SQLException: Login failed for user 'confuser'.
Cause
Error: 18456, Severity: 14, State: 12
means that the authentication is successful, but server access fails due to permission.
Resolution
- Ensure that the SQL Server Authentication mode is enabled.
Assuming that the SQL Server username is
confuser
, run the following SQL query in amaster
database, to give the permission to connect via TCP/IPGRANT CONNECT SQL TO "confuser" GRANT CONNECT ON ENDPOINT::"TSQL Default TCP" TO "confuser";