Connecting to Oracle Database server is a bit tricky if we do not install ODAC (Oracle Data Access Components) in the server. Without ODAC it will not allow us to connect to the Oracle database. In this blog we will see how to connect to oracle database without ODAC but using ODBC as a channel to connect to the Oracle database.
Do not know how to create a user in the oracle database? Use this link
Open the Oracle Database Server and create a Power Bi User in the Database and the password should be uppercase. Example: ADMIN (If the password is not in Uppercase, we will not be able to setup the ODBC connection. The user highlighted in the picture i.e. testsys is the User which I have created.
![](https://static.wixstatic.com/media/bc66f3_18fafe97f1424e4c918a2e6758f890dc~mv2.png/v1/fill/w_813,h_469,al_c,q_90,enc_auto/bc66f3_18fafe97f1424e4c918a2e6758f890dc~mv2.png)
Now go to Control Panel Click on System and security > further click on Administrative tools > ODBC Data source 64 bit (in case if you are using Power BI 32bit version then choose 32bit ODBC data source)
![](https://static.wixstatic.com/media/bc66f3_8d88ef225c7f4007bde826f65649e170~mv2.png/v1/fill/w_638,h_352,al_c,q_85,enc_auto/bc66f3_8d88ef225c7f4007bde826f65649e170~mv2.png)
Open the ODBC Data Source Administrator.
![](https://static.wixstatic.com/media/bc66f3_865e4e8b915c444eb523e7823a26a7b4~mv2.png/v1/fill/w_818,h_580,al_c,q_90,enc_auto/bc66f3_865e4e8b915c444eb523e7823a26a7b4~mv2.png)
To create a new Oracle DB ODBC data source, click on the Add button under User DSN or System DSN tab. Both of these tabs are used to create a connection to ODBC data source but the difference is that the User DSN tab will show data source only for a currently logged user on this computer. While creating data sources under the System DSN, it will be available to any user that is logged on to this computer. I’ll choose System DSN.
Click on Add, it will open a (Create New Data Source) Dialog box. Choose an Oracle Database Server and hit Finish
![](https://static.wixstatic.com/media/bc66f3_5cbb8e3a73af4fb583b676caf6d744e2~mv2.png/v1/fill/w_668,h_473,al_c,q_85,enc_auto/bc66f3_5cbb8e3a73af4fb583b676caf6d744e2~mv2.png)
Once we Click on Finish a dialogue box (Oracle ODBC Driver Configuration) pops up. Provide a name to the Data Source and a Service name which should be server/database service name and give the User ID which we have created for Power BI in their respective fields and then Click on Test Connection.
![](https://static.wixstatic.com/media/bc66f3_6d4c0545705b49f5b39205bf8f3c7301~mv2.png/v1/fill/w_644,h_506,al_c,q_85,enc_auto/bc66f3_6d4c0545705b49f5b39205bf8f3c7301~mv2.png)
Once we click on Test Connection it opens up a new dialog box (Oracle ODBC Driver Connect) asking for password, now provide the uppercase password.
![](https://static.wixstatic.com/media/bc66f3_8154cd365f824cd8bfd6dbe9a69c5ed1~mv2.png/v1/fill/w_544,h_416,al_c,q_85,enc_auto/bc66f3_8154cd365f824cd8bfd6dbe9a69c5ed1~mv2.png)
After entering password click OK , it will show Connection successful message, click on OK to add the data source.
![](https://static.wixstatic.com/media/bc66f3_1771938c1d52401c9b27722028b073dd~mv2.png/v1/fill/w_612,h_440,al_c,q_85,enc_auto/bc66f3_1771938c1d52401c9b27722028b073dd~mv2.png)
Now the connection is established, and it will sit in the System DSN.
![](https://static.wixstatic.com/media/bc66f3_df4bd9feb89c4517aa8c29a94ec9928d~mv2.png/v1/fill/w_679,h_482,al_c,q_85,enc_auto/bc66f3_df4bd9feb89c4517aa8c29a94ec9928d~mv2.png)
1. Connecting directly to Oracle Database!
Now We can directly connect to the Oracle database by Opening the Power BI Desktop then click on Get Data > click on More and choose Oracle database.
![](https://static.wixstatic.com/media/bc66f3_c79ae25315cc4016b3ea30280db841a6~mv2.png/v1/fill/w_980,h_524,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/bc66f3_c79ae25315cc4016b3ea30280db841a6~mv2.png)
A dialog box pops up, just click OK and it will ask for a Server Name (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) Use this string - modify with appropriate details and paste it in the server.
![](https://static.wixstatic.com/media/bc66f3_630685119dad4d22b2b1e34808d8662f~mv2.png/v1/fill/w_788,h_379,al_c,q_85,enc_auto/bc66f3_630685119dad4d22b2b1e34808d8662f~mv2.png)
It will ask for credentials so please do provide the User credentials which we have created earlier and click on Connect.
![](https://static.wixstatic.com/media/bc66f3_08fccf74ff5c428cad63a4e6d4121a4a~mv2.png/v1/fill/w_686,h_314,al_c,q_85,enc_auto/bc66f3_08fccf74ff5c428cad63a4e6d4121a4a~mv2.png)
Further, it will open a Navigator here we can select the Tables and click on Load and use the tables to develop a report.
![](https://static.wixstatic.com/media/bc66f3_62f25de0c51a47318c1e27c9e7042c63~mv2.png/v1/fill/w_980,h_533,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/bc66f3_62f25de0c51a47318c1e27c9e7042c63~mv2.png)
2. Connecting using ODBC Data Source!
We can also connect with ODBC connection; open the Power BI Desktop click on Get data> click on More and choose ODBC which is under Other section and click on Connect.
![](https://static.wixstatic.com/media/bc66f3_b94f6d6e60d04e5c82cfc8aabcad91a7~mv2.png/v1/fill/w_980,h_530,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/bc66f3_b94f6d6e60d04e5c82cfc8aabcad91a7~mv2.png)
It opens ODBC dialog box and list all data sources that are listed in the ODBC (Earlier we have created Checking ODBC connection)
![](https://static.wixstatic.com/media/bc66f3_67a816624d5842fe982cd5ca3bd2b6ab~mv2.png/v1/fill/w_884,h_458,al_c,q_90,enc_auto/bc66f3_67a816624d5842fe982cd5ca3bd2b6ab~mv2.png)
Select the ‘ODBC data source connection’ and click OK, it will prompt for database credentials give the Power BI User credential which we have created earlier and click on Connect.
![](https://static.wixstatic.com/media/bc66f3_a73ec52371a244baa2ac0ff1bc90b627~mv2.png/v1/fill/w_980,h_501,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/bc66f3_a73ec52371a244baa2ac0ff1bc90b627~mv2.png)
Then it opens the Navigator where we can select the Tables to develop a desired report and click Load.
![](https://static.wixstatic.com/media/bc66f3_06d373d1911a43e7b7655463d9bd8afd~mv2.png/v1/fill/w_970,h_778,al_c,q_90,enc_auto/bc66f3_06d373d1911a43e7b7655463d9bd8afd~mv2.png)
It loads the data into Power BI Desktop where we can view the tables in the Field Pane.
![](https://static.wixstatic.com/media/bc66f3_1109cc06463d456eb767710878074030~mv2.png/v1/fill/w_560,h_324,al_c,q_85,enc_auto/bc66f3_1109cc06463d456eb767710878074030~mv2.png)
![](https://static.wixstatic.com/media/bc66f3_6e26e73de14c41228546486a9c4b1b4b~mv2.png/v1/fill/w_975,h_390,al_c,q_90,enc_auto/bc66f3_6e26e73de14c41228546486a9c4b1b4b~mv2.png)
This is it! Use the #ODBC as a channel to connect to Oracle Database. But if you want to use On-premises data gateway (#PowerBIGateway) to refresh the data in Power BI Service you need to have #ODAC (Oracle Data Access Components) installed and configured in the Oracle database server.
What do you think about it? Please Comment and Share and Follow!!
Comentários