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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Minoo28
New Member

Error - Oracle: ORA-12154: TNS

Am unable to connect to the Oracle Database.  The error is - "Oracle: ORA-12154: TNS:could not resolve the connect identifier specified".  Can anybody offer a solution.  Thanks

18 REPLIES 18
theov
Advocate II
Advocate II

Hello, 

I'd make sure the ora client is installed properly, the string is correct and finally tnsnames.ora is up to date. This video might helps as well:

https://www.youtube.com/watch?v=EpeJrO5tHDc

Anonymous
Not applicable

In my case I was able to fix it just putting Server/DB

I was just putting DB in the server name part

Server/DB worked for me in the websever application, but it couldnt connect to my saved oracle instance because it was in a different format. Was not able to change the format in powerbi so i'm back to square one!

Anonymous
Not applicable

Make sure your TNSNAMES.ORA file is updated to your new database in the oracle folder and it will work fine.  I had the same issue and couldn't figure out what was happening, turns out the DB Admins changed the database hostname.  Went in changed the tnsnames.ora file name to the new database connections and power BI connected with no problem.

bjerbe
Advocate I
Advocate I

I was getting this as well, the solution for me was in the Server field to enter <server name>:<port>/<service name>.  Then in the authentication window, select Database and enter the username and pasword.

Do you still need TNSnames file? or it will work without updating/adding connection to TNS file?
I tried the same and still getting the same error (Without any TNS Name file)

I don't believe you should need the TNSNames files ans that would be redundant. In the parameter, you are alredy providing what TNSNames file provides. You can update the TNSNames file to make use is TNSping to ensure that the connection is open.

Hello

 

Should i enter in the parenthesis 

 

The <> just means that it is a variable specific to your instance, do not use the <>.

Super..This worked for me, Thx.. 

it wroks!!! thx!

This worked for me, thanks.

blopez11
Super User
Super User

Look like the connection info you specified can't be resolved

Please see the following taken from http://stackoverflow.com/questions/7957955/ora-12154-could-not-resolve-the-connect-identifier-specif...

 

  1. Is there a tnsnames.ora file
  2. Is there an entry in the file for the service
  3. Can the application find the tnsnames.ora?

Your problem may well be number 3 - does the application run as a different user than when you run the console?

Oracle looks for the tnsnames.ora file in the directory defined in the TNS_ADMIN environment variable - If you are running as different users, then maybe the TNS_ADMIN environment variable is not set, and therefore it cannot find the file?

 

Hope this helps,

In simple terms, would you mind explaining the steps to resolve # 3? Thank you. 

 

1. How do I determine what user the application runs as? This isn't immediately clear. 

2. Not sure what the TNS_ADMIN environment variable is or how to set it in this case or whether google instructions on "how to set TNS environent variable" which I followed are even relevant, or if there's something else I need to do. 

 

Please expand. 

Try like this please

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=101.21.29.218)(PORT=3090))(CONNECT_DATA=(SERVICE_NAME=TST)(INSTANCE_NAME=TST)))

Hello blopez11,

 

I checked what your link suggested 1) sqlplus user - no errors there. 2) defined the TNS_ADMIN string in the registry in the two homes I had.  I am still getting the same error.  Mine is on premise and not a web application.

Don't know what else I need to do.

 

Thanks

 

Minoo28

Did you try adding the Host and Service Name to the PowerBI. 

If your hostname is System24 and ServiceName is DEV1 then you can try System24/DEV1 

 

Minoo28
New Member

I am unable to connect to Oracle Database.  getting an error - Details: "Oracle: ORA-12154: TNS:could not resolve the connect identifier specified". 

 

I am able to connect to the same oracle database using Power Query in Excel but not able to connect with Power BI.  This tells me I have downloaded the correct Oracle Client with the correct TSN.ORA and Service names.

Can anybody help me find a solution. 

Thanks

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.