将Oracle DB与Power BI连接时出现错误

艾哈迈德·萨利赫(Ahmad Saleh)

我正在尝试使用Power BI与Oracle 12c数据源连接,我寻找了多种解决方案,并按照Microsoft文档中的说明进行操作

https://docs.microsoft.com/zh-cn/power-bi/desktop-connect-oracle-database#installing-the-oracle-client

但是我认为工作中缺少一些东西。

  • 首先尝试通过Oracle数据库进行连接:

我要在同一台笔记本电脑上安装新的Oracle和powerbi,服务器应采用文档所述的“ ServerName / SID”格式,因此我的将是:

本地主机/ testdb

在此处输入图片说明

然后添加数据库用户和密码 在此处输入图片说明

我得到这个错误 在此处输入图片说明

I have just installed Oracle 12c 64 bit on my laptop to test the connection 在此处输入图片说明

also I am using Power Bi 64 bit on 在此处输入图片说明 also I am on windows 10 64 bit 在此处输入图片说明

I have also installed "64-bit Oracle Data Access Components (ODAC)" from Oracle website: http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

在此处输入图片说明

where I have added my database to DSN using both "OraDB12Home1" and "OraClient12Home2" 在此处输入图片说明

and also for both DSN I have tested the connection and it was successful 在此处输入图片说明

  • Next I test connecting using ODBC OraClient12Home2:

在此处输入图片说明

then inserting username and password for database 在此处输入图片说明

then I get this Error 在此处输入图片说明

and when I connect with OraDB12Home1 I get this error: 在此处输入图片说明

I have also clear all data source connections on power bi because sometime it just display the error without sending me to next screen to enter user and password 在此处输入图片说明

These are the details of tnsnames.ora :

  # tnsnames.ora Network Configuration File: 
  C:\app\Ahmadssb\virtual\product\12.2.0\dbhome_1\network\admin\tnsnames.ora
  # Generated by Oracle configuration tools. 

  LISTENER_TESTDB =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


TESTDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = testdb)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.babader.com)
    )
  )

I don't know what am I missing I even have exported the data from oracle as dump file and convert it as sql but it seems like this is not supported now on power bit and this is another situation.

I need to get my database data into PowerBi the data what, am I missing and what should I do to make it connect successfully?


  • Update: trying testdb on Server field:

as suggested on comments to change localhost/testdb to only testdb (also tested in capital TESTDB) since it should be typed on server. But this also didn't work with me and still getting the same error check the following pictures:

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

it seems like the connection to oracle is not working, is there something I should do in oracle to make this work?

Ahmad Saleh

I have formatted windows, reinstall everything from beginning and connected via ODBC and it works (yet I get the normal error DataSource.Error: ODBC: ERROR [07006] [Oracle][ODBC]Restricted data type attribute violation)

but with select query for each table needed, I get it work

  • downloaded Oracle Database 12c Release 2

  • install normally

  • from start menu -> Windows Administrative Tools > ODBC Data Sources (64-bit)

  • in user DSN tap, follow the next pictures:

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

since connection was successful, then click "OK" to save it

next on Power BI select get source:

  • select ODBC

在此处输入图片说明

  • select the DSN name that you provided above

在此处输入图片说明

  • now don't click on OK because it may give you an error I'll explain it below.
  • click on advanced option
  • type a SELECT query for specific table and click OK 在此处输入图片说明

  • then it'll display the table data preview, click load 在此处输入图片说明

  • congratulation, you are done 在此处输入图片说明

in case you didn't type a select query and clicked OK then you added your username and password

在此处输入图片说明

  • it'll connect and display list of tables, but you may end up with this error (the provided solution on the internet was the above one ):

https://community.powerbi.com/t5/Integrations-with-Files-and/ODBC-Connection-error-07006/td-p/278165

在此处输入图片说明

这就是我最终要如何连接的方式,仍然有一个与该主题无关的小问题,我将其放在另一个问题上,但希望此答案将有助于其他人建立连接

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

连接到 Oracle DB 时出现 External: SIGSEGV 错误

将连接从 MySql DB 更改为 Oracle DB

连接Yii Db设置时出现Db错误

如何将oracle DB与python脚本连接?

将映像作为BLOB上载到Oracle DB时出现PHP OCI8警告

将pyqtgraph linearregionitem与plotitem的轴连接时出现递归错误

将Firebase连接到Flutter项目时,出现错误

将Android连接到WebHost时出现Json错误

将 UI 与逻辑 Swift 连接时出现关闭错误

如何将Google Sheet与Power Bi连接?

尝试将 SQL 开发人员与 Oracle 数据库连接时出现 ORA-12705 错误

将 Intellij IDEA DB Navigator Plugin 连接到 Oracle DB 连接

使用节点oracle-db npm packagae时出现ORA-12514错误

从IIS连接到Oracle DB。错误:基础提供程序在打开时失败

连接Oracle 10g Express Edition时出现Tibco连接错误

Spring Boot在连接Oracle数据库时出现错误:无法打开JDBC连接以执行DDL

雪花+ Power BI连接

Power BI REST API-使用应用程序密钥/服务主体时出现401授权错误

Oracle DB - 连接问题

将连接字符串分配给结构的 MySQL 连接属性时出现 NullReferenceException 错误

尝试将db中的数据发布到网页时出现mysql错误

尝试将值保存到Access DB,但是尝试ExecuteNonQuery时出现错误

通过Attunity for SSIS测试与Oracle Connector的连接时出现ORACLE_HOME错误

以编程方式将Power BI报表部署到Power BI报表服务器并更改连接字符串

将pgAdmin3连接到Heroku PostgreSQL DB时发生SSL错误

Power BI-Azure Cosmos DB的桌面DateTime

连接到Power BI API时收到“禁止(403)”

尝试使用休眠将数据插入数据库时出错。错误是约束冲突异常(使用 Oracle DB)

IBM Cloud Functions:尝试连接到 DB2 时出现 SQL 语法错误