Error: "Could not connect to server" When using the "Test Connection" Option on Tableau Server With MSSQL Impersonation

Published: 09 Mar 2017
Last Modified Date: 05 Dec 2017


When testing a connection to a published data source on Tableau Server, the following error might occur after clicking the "Test Connection" option: 

Could not connect to server
An internal error occurred while establishing an impersonated database connection.


  • Tableau Server
  • MS SQL Server


Test the connection by connecting to the published data source using Tableau Desktop. 


SQL Server will not accept an Active Directory (AD) username and password passed from a separate AD user account. 

Typically, "Test Connection" will function because it creates a direct connection to the database and does not involve the Run As User service account. However in this case, "Test Connection" is attempting to validate the user signed into Tableau Server instead of the Run As User. If this user does not have connect permissions, using the "Test Connection" option will fail. 

When Tableau Server runs a refresh or connects to SQL it will use the Tableau Server Run As user account and the connection will succeed. It is expected behavior that the Database connection will connect with the Run As User account before providing SQL Server the impersonated user's credentials through the query. 
Did this article resolve the issue?