【问题标题】:ODBC connection from Postgres database into Power bi error从 Postgres 数据库到 Power bi 错误的 ODBC 连接
【发布时间】:2019-06-14 16:16:12
【问题描述】:
您好,我在连接到我的 postgres 数据库时遇到问题,我在我的 64 位机器上使用此连接字符串。我已经下载了更新的 64 位 postgres 驱动程序。
使用的驱动程序:database=Travel_Information;driver={PostgreSQL Unicode(x64)};port=5432;server=travel-information.chda0n3dhd8k.eu-west-1.rds.amazonaws.com
Issue when selecting tables to import
有什么建议吗?
【问题讨论】:
标签:
postgresql
odbc
powerbi
【解决方案1】:
在 DSN 中选择“(无)”而不是“dBASE 文件”,您的连接字符串应如下所示。
database=dbname;driver={PostgreSQL Unicode(x64)};port=5432;server=server.eu-w1.compute.server.com;sslmode=require;
我必须使用 sslmode=require,因为我要连接到 heroku 服务器上的 postgresql 服务器实例,它需要它。
【解决方案2】:
这是一个 SSL 问题
我在连接字符串的末尾添加了sslmode=require,它成功了。
我之前尝试过使用原始 Postgredb 连接器和各种 Npgsql 版本,但没有成功。
虽然仍然可以选择将证书从服务器导入到您的客户端,但如果您无权访问,您可能需要与 DBA/系统管理员联系以获取 PostgreSQL 服务器的 SSL 证书。在 PostgreSQL 服务器的配置文件夹中有一个 postgresql.conf 文件,在其中搜索 ssl 设置,有一个带有 ssl 证书位置的文件。注意不是包含私钥的密钥文件,只有包含公钥的证书文件。将其或其内容复制到运行 PowerBI 的机器上并使用 that procedure 导入