Unable to Connect to SQL Server Due to Error: 18456, Severity: 14, State: 12

Still need help?

The Atlassian Community is here for you.

Ask the community

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 the 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 a master database, to give the permission to connect via TCP/IP

    GRANT CONNECT SQL TO "confuser"
    GRANT CONNECT ON ENDPOINT::"TSQL Default TCP" TO "confuser";

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.