知识库

访问已发布工作簿时出现“Unable to connect to the data source”或“User(s) do not have permission to access datasource”错误


发布时间: 18 Dec 2017
上次修改日期: 20 Jul 2023

问题

打开使用已发布数据源的视图时,可能会出现以下错误:
 
“Unable to connect to the data source.
Try connecting again. If the problem persists, disconnect from the data source and contact the data source owner.(无法连接到数据源。请尝试再次连接。如果问题仍然存在,请断开数据源连接并与数据源所有者联系。)”

“DataServiceFailure
Unable to connect to the server "localhost". Check that the server is running and that you have the access privileges to the requested database.(DataServiceFailure。无法连接到服务器“localhost”。请检查服务器是否正在运行,并且您具有所请求数据库的访问权限。)”

 
User(s) do not have permission to access datasource.
There was an error with the data source "[DataSourceName]".Verify that the data source is configured correctly.(用户没有访问数据源的权限。数据源“[数据源名称]”存在错误。请验证是否正确配置了数据源。)

环境

  • Tableau Cloud
  • Tableau Server

解决方案

选项 1

作为站点管理员或数据源所有者,为受影响的用户授予已发布数据源的“连接”权限。

选项 2

针对已发布数据源使用“嵌入式密码”重新发布工作簿。
  1. 在 Tableau Desktop 中打开受影响的已发布工作簿。请参见从服务器打开发布的工作簿了解相关步骤。
  2. 重新发布工作簿,并确保所有已发布工作簿的“身份验证”设置均设为“嵌入式密码”。有关详细信息,请参见设置凭据以访问您发布的数据

选项 3

使用 Web 制作和嵌入式凭据重新保存工作簿。
  1. 作为工作簿作者或站点管理员,使用 Web 制作编辑工作簿。请参见在 Web 上编辑 Tableau 视图了解相关步骤。
  2. 依次选择“文件”“另存为...”
  3. 为工作簿指定与现有工作簿相同的名称以将其覆盖,并选中“嵌入数据源的密码”框。
  4. 选择“保存”

原因

受影响的用户未获授权连接到已发布数据源,或者工作簿中的某些已发布数据源设置为“提示用户”,而不是“嵌入式密码”。
 
此文章是否已解决问题?