cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Unable to connect using Oracle database and ODBC

Hi team,

 

i have access to an oracle database but for some reason I cannot access the database and keep getting error message stating "Oralce: ORA-12541: TNS: No Listener". I have tried the following as stated other knowledge base

 

1. Update the tnsname file

2. Update the host information in listener and tnsname

3. uninstall and reinstall the oracle instant client

4. updated the environment variables

 

Having said the above, I went to verify if my connection from the ODBC driver works fine and I'm able to connect successfully but cannot connect via Data > New Query >  Database > Oracle Database and the same applies for ODBC.

 

Please advise....A!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@v-yuezhe-msft Apologies for getting back so late but I found a solution for this to work.

 

New Query > connect to DB > Oracle Database > in the servername the syntax to use is "hostname:[port number] /SID" which I was using only as host ID. After this update, it all worked fine.

 

Thanks again for the help.

 

Kind regards,

Anand

View solution in original post

8 REPLIES 8
v-yuezhe-msft
Microsoft
Microsoft

Hi @Anonymous,

Do you use Power BI Desktop to connect to remote Oracle database? If that is the case, there are some proposals for you  troubleshooting this issue.

1. Make sure you have installed the latest version of Oracle client following the instructions in this article. Ensure that your Oracle client, Oracle Server and Power BI  Desktop have the same bitness(32bit or 64bit).

2. Make sure the Host IP you update in listener.ora is correct, you can use ipconfig command to verify the Host IP.

3. Restart LISTENER with the following commands.

    lsnrctl  stop

    lsnrctl  start

4. Use TNSPING to test the connectivity from Desktop to Oracle server.

5. When connecting to Oracle from Power BI desktop, enter the connection details in TNSnames.ora file, then check if it is successful. Alternatively, you can connect to the Oracle Database via EZConnect connection string. For more details, please review this similar blog.


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Kind of a necromancer reply.  But let's say that I work in an environment where I have 32 bit oracle instances holding some data, and 64 bit oracle instances holding other data.   Do I need two installs of Power BI to get this to go?  What I want to blend the data? 

Anonymous
Not applicable

Hi Lydia,

 

I have tried the following and still have the same issue

 

1. manually updated the listener.ora file with the host information (available used based on cmd > hostname)

2. deleted and re-configured listener.ora using the net assistant part of Oracle home

3. I've both Power BI for desktop and the Oracle server running 64-bit

4. tried to run the commands lsnrctl > start or services but i get message as mentioned below

   TNS-12560: TNS: protocol adapter error
   TNS-00530: Protocol adapter error

 

Not sure what am I doing incorrect here. Please advice.

 

Kind regards,

Anand

 


4. tried to run the commands lsnrctl > start or services but i get message as mentioned below

   TNS-12560: TNS: protocol adapter error
   TNS-00530: Protocol adapter error

 

 

 Hi @Anonymous,


About the above error message, I would recommend you post it in Oracle forum to get dedicated support.

Thanks,
Lydia Zhang


 

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yuezhe-msft Apologies for getting back so late but I found a solution for this to work.

 

New Query > connect to DB > Oracle Database > in the servername the syntax to use is "hostname:[port number] /SID" which I was using only as host ID. After this update, it all worked fine.

 

Thanks again for the help.

 

Kind regards,

Anand

View solution in original post

Thank you very much. This worked for me as well. One update I would make is that for me "hostname:[port number] /SID" didn't work, but "hostname:[port number] /[SERVICE_NAME]" is what worked. I had tried pulling the SID from the listener.ora on the server but still couldn't get connected. When I used the "[SERVICE_NAME]" it connected right away. Thanks again!

Nothing worked for me except your advice.  Thank you @hesske from 3 years in the future!

 

hostname:[port number] /[SERVICE_NAME]

I was having the same issue and could not work out what was wrong...this change allowed me to connect fine;

 

hostname:[port number] /SID

 

THANK YOU!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors