Forum Discussion
Object reference not set to an instance of an object (Oracle DB)
Hi, Anonymous
Based on the information you've shared, it appears that the "Object reference not set to an instance of an object" error is related to accessing or retrieving data from an Oracle database through Power BI. This error typically indicates a null reference exception, which can occur for various reasons, including insufficient permissions, incorrect configuration, or issues with the Oracle Data Access Components (ODAC).
Given that your company has a blocker on the 64-bit ODAC and considering the error message points to an Oracle client directory, it's likely that the issue is related to the Oracle client configuration or permissions.
Here are a few steps you can take to troubleshoot and potentially resolve this problem.
1. Verify User Permissions, ensure that the user account used to connect to the Oracle database has the necessary permissions. This includes access to the relevant tables, views, and any other database objects required by your Power BI report.
2. Check ODAC Configuration, the Oracle client directory mentioned in your error message ('C:\oracle\product\12.1.0\client_1') should be part of the PATH environment variable, and the tnsnames.ora file should be correctly configured to point to your Oracle database.
Connect to an Oracle database: Connect to an Oracle database with Power BI Desktop - Power BI | Microsoft Learn
3. Reconfigure Power BI Data Source, since you've already cleared permissions from the data source, try setting up the data source connection again. Make sure to use the correct connection string and credentials. If you're using an ODBC connection, ensure that the DSN is correctly configured to use the Oracle client.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Anonymous regarding #2 the mentioned file is in this location C:\oracle\product\12.1.0\client_1\network\admin and when I open the file this is the server I should be connected to ...
XLOSP.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = MATLKXLO1ORP001)(PORT = 15210))
)
(CONNECT_DATA =
(SERVICE_NAME = xLOSP)
)
)