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

Troubleshooting Databases

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

  • The following error appears in the SQL Server log:

    Login failed for user '<STASH_USER>'. 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-stash.log:

    2015-04-09 13:53:16,046 WARN  [http-nio-80-exec-7] user @1BFSM6Dx833x1035x0 35ndgf 192.168.30.100 "POST /admin/db/edit HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager A connection could not be opened with the DataSource
    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '<STASH_USER>'. ClientConnectionId:

原因

Error: 18456, Severity: 14, State: 12 means that the authentication is successful, but the server access fails due to permission.

ソリューション

  • Ensure that the SQL Server Authentication mode is enabled.
  • Assuming that the SQL Server username is stashuser, run the following SQL query in a master database, to give the permission to connect via TCP/IP

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

最終更新日 2016 年 3 月 30 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.