Unable to Connect to SQL Server Due to Error: 18456, Severity: 14, State: 12
症状
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: 12The 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 amasterdatabase, to give the permission to connect via TCP/IPGRANT CONNECT SQL TO "stashuser" GRANT CONNECT ON ENDPOINT::"TSQL Default TCP" TO "stashuser";
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.