KNOWLEDGE BASE

Error: "The principal ... is not able to access the database..." When Joining Different Databases via Custom SQL


Published: 24 Jul 2017
Last Modified Date: 07 Dec 2017

Issue

When attempting to join from two different databases on the same MS SQL server via Custom SQL, Tableau Server returns the following error under the current security context: 

"[SQL Server] The principal "DOMAIN\hostname" is not able to access the database "dbname"

Environment

  • Tableau Server 10.1.7
  • Windows Server 2012
  • MS SQL Server

Resolution

Work with your Database Administrator to set the following TRUSTWORTHY security setting: 
Set the TRUSTWORTHY setting in SQL Server for that database to 'ON' with a command similar to this:

ALTER DATABASE AdventureWorks2012 SET TRUSTWORTHY ON

Cause

This issue may occur due to the TRUSTWORTHY setting on the database in question being set to 'OFF'.
Did this article resolve the issue?