Errors when connecting oracle DB with Power BI

power bi cannot connect to oracle database
power bi oracle sql statement
power bi gateway oracle connection
power bi oracle: ora-12154: tns:could not resolve the connect identifier specified
power bi oracle direct query
details: "oracle: ora-12504: tns:listener was not given the service_name in connect_data"
power bi desktop
power bi desktop download

I am trying to use Power BI to connect with Oracle 12c Data source, I have looked for multiple solutions and followed the instruction on Microsoft documentation

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

But I think there is something missing in work .

  • First trying to connect via Oracle Database:

where I am installing fresh new Oracle and powerbi on the same laptop where server should be in this format "ServerName/SID" as described on documentation, so mine will be:

localhost/testdb

then adding Database user and password

and I get this error

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?


Connect to an Oracle database, If you see the error message, Object reference not set, in the Power BI Gateway when you connect to an Oracle database, follow the instructions in Manage your​  I am trying to use Power BI to connect with Oracle 12c Data source, I have looked for multiple solutions and followed the instruction on Microsoft


I was finally able to get PowerBI to work with the Oracle driver by uninstalling the PowerBI from the Microsoft Store and downloading the msi file from the advanced download options on https://powerbi.microsoft.com/en-us/desktop/. I suspect it's some security restriction with a store app that prevents using the Oracle libraries.

Re: Errors when connecting oracle DB with Power BI, First trying to connect via Oracle Database: where I am installing fresh new Oracle and powerbi on the same laptop where server should be in  For32-bit versions of Power BI Desktop: 32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio (12.1.0.2. For64-bit versions of Power BI Desktop: 64-bit ODAC 12c Release 4 (12.1.0.2.4) for Windows x64 . Please take a look at this document, it should be helpful to you. Best Regards, Herbert


It follows the same connection architecture as SQL Plus, so the Server field in Power BI should contain whatever follows the @ sign in your successful SQL Plus test.

So I would try TESTDB in the Server field when making an Oracle connection from Power BI, not localhost/testdb. If that works I presume you could ignore ODBC.

Struggling with Oracle DB Connection, Windows Installer Error Message Any advice on how to get the Oracle Client software that is needed to connect to an Oracle DB? Thanks! That worked after removing all other versions, and making sure that I had the x64 version, of course. Still encountering some other issues at the query execution and filtering level, but that helped me over the connection hurdle.


How to connect to oracle database from power Bi?, 7. Connect data through import or direct query to Oracle database. 8. Select mode of authentication (window /database/Microsoft account) 9. If you downloaded Power BI Desktop from the Microsoft Store, you might be unable to connect to Oracle databases because of an Oracle driver issue. If you encounter this issue, the error message returned is: Object reference not set .


Power BI from Oracle Database, i met issue when using SQL query to load data from oracle database, error message pops up likes “command not properly ended”,may i know if  Hi Everyone, I got a requirement for my client where I need to build reports by connecting power bi to oracle database cloud and have to implement data level security. is there an possibility to achieve this requirement? Thanks In advance regards, Rakesh


Errors when connecting oracle DB with Power BI, Errors when connecting oracle DB with Power BI. I am trying to use Power BI to connect with Oracle 12c Data source, I have looked for multiple  Connection to Oracle from Power BI using direct query works but not import. When I connect through import it gives me an error: "The provider microsoft.powerbi.oledb is not registered". Can someone please help me understand what the issue is.