Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
marc_mueller
New Member

Connecting to Oracle Database - Object Reference error

I am running into the following error when connecting to an Oracle DB: Object reference not set to an instance of an object

 

In summary:

  • My connection string is defined in tnsnames file
  • I can connect to the DB through other means (e.g., TOAD)
  • I have installed the Oracle drivers as instructed by Power PI when I first attempted to make the Oracle connection

 

When configuring the Oracle connection in BI Desktop:

  1. I enter my Oracle service name in the Server text field
  2. I select DirectQuery option
  3. I enter my database credentials
  4. Ultimately, I get the error listed above when attempting to connect

As of now I am stuck looking for any ideas.

 

Marc

8 REPLIES 8
apate277
Frequent Visitor

I had the same issue and worked out an algorithm.

After various trial and errors I found this way  

 

1. Ensure that odp.net client (32 bit) is installed for Visual Studio 2015 32 bit.  Google 'ODTwithODAC' and download from Oracle site
Note : Visual 2017 is not yet supported by Oracle as per my experience so only 2015 was compatible

2. Ensure that Oracle database server is configured/installed. I have Oracle express (Oracle Database XE 11.2).  64 bit of this was successful. 32 bit was not.

3. The default provided user id is admin which is 'SYS' and password is <what you provide>.  Database name(sid) is 'xe' It is necessary that you create an actual user by opening the oracle server portal which is generally

http://127.0.0.1:8080/apex/f?p=4950

 then click "Application Express" tab and create database user which will be used for Power BI connection or for any other dev tool. 
Note: 'SYS' didnt connect to PBI so I had to create seperate user.

4. POWER BI 32 bit : only 32 bit works. You can install 32 and 64 side by side. Click Get Data>Enter Servername/sid (eg Localhost/xe) and on next screen enter database user credentials.

 

Let me know if it worked or not

arify
Employee
Employee

It could be the same issue with this thread: http://community.powerbi.com/t5/Desktop/PowerBI-desktop-64Bit-oracle-connection-error-Object-referen...

 

What happens if you don't use Direct Query?

If I do not use DirectQuery ('Import' instead), I get the same error.

 

Marc

Can you please send us a frown email with the traces as well, like I asked in the other thread? So that we can make sure it's the same issue, and if not, those traces will help us fix the issue.

 

Here's how you can do it:

Open PBI Desktop > Options > Diagnostics > Enable Tracing (also open traces folder while you're in this dialog)

Reproduce the error

(now the trace files should be in the traces folder, you may need to close PBI Desktop if they look like 0 bytes)

The error message should have a Send A Frown button, use that button to send us the email, with attaching those trace files.

 

Thanks!

Will do, but can you tell me the default location of the traces folder?  I can enable tracing through Options > Diagnostice.  However, I am not sure if I need to set the traces folder path or not?  If I click 'Open traces folder', I am denied (coporate policy prevents PBI accessing explorer.exe).  

 

The other issue I will have is I am not getting an Error message as you described  (popup with a frown button), but instead a popup titled 'Unable to Connect' with the text 'We encountered an error while trying to connect.  Details: "Object reference not set to an instance of an object".

 

 

Marc

Oh, I see.

Default folder looks something like this: C:\Users\<username>\AppData\Local\Microsoft\Power BI Desktop\Traces

 

About sending the frown, you can click the Send a Frown button on here:

Untitled.png

 

Thanks!

Was this issue resolved? I am facing the same issue

Was this resolved? I am facning the same issue.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.