Skip to main content
I am facing some weird behavior from fme desktop, i have a sql executor and able to connect to oracle (thru named connection) , I tested it , testing good, able run the sql to bring fields to expose, bring the output fields(expose) within sql executor... i can do everything in development stage. But while running it gives TNS name error. how can i fix this?

 

9:26Connecting to ORACLE database `My_connection' with user name of `' and password of `***'

 

Error connecting to Oracle database: message was `ORA-12154: TNS:could not resolve the connect identifier specified'. (serverType=`ORACLE8i', serverName=`My_connection', userName=`', password=`***', dbname=`')

Do you have multiple Oracle installs (Oracle Homes) on your computer?

FME will use the first one mentioned in the PATH and perhaps that one does not have the entry in the TNSNAMES file.

Just guessing, but this could be the cause.

Hope you will find the solution.


@erik_jan / @here No, only one oracle instance. Moreover its successful while testing database connections(fme options window), And i am able to run sql to expose fields from sql(within sql executor) , connection establishes when i pass embedded oracle credential parameters like useename, password and DB name . But when i enter Named connection and run... it fails.

 

fme send / serches named connection directly to tns name entry file.

FME doesn't pick up the Named Database Connection and thinks i'm sending it a TNS namein those scenarios

@fkemminje,

I am assuming you are on Windows System.

  • What version of FME are you using?
  • What version and type of the Oracle Client do you have installed?
  • Has this function on your computer before in other versions of FME?
  • Do you have more than one version of Oracle Client Installed?
  • Check for the existence of the environment variable TNS_ADMIN. If this exists, FME will be using this to discover your tnsnames.ora file. If this is being used, confirm that tnsnames.ora file contains the correct TNS entry.

It is very odd that you have a partial working connection.

Please confirm that if you go to FME Options>Database Connections, right-click on the connection and click edit... please provide the syntax you have used... and also test the connection here (I think you shared it works but want to confirm this).

If you don't mind, could you also share the syntax you have used in the embedded connection parameters that are working as well?

 


@fkemminje,

I am assuming you are on Windows System.

  • What version of FME are you using?
  • What version and type of the Oracle Client do you have installed?
  • Has this function on your computer before in other versions of FME?
  • Do you have more than one version of Oracle Client Installed?
  • Check for the existence of the environment variable TNS_ADMIN. If this exists, FME will be using this to discover your tnsnames.ora file. If this is being used, confirm that tnsnames.ora file contains the correct TNS entry.

It is very odd that you have a partial working connection.

Please confirm that if you go to FME Options>Database Connections, right-click on the connection and click edit... please provide the syntax you have used... and also test the connection here (I think you shared it works but want to confirm this).

If you don't mind, could you also share the syntax you have used in the embedded connection parameters that are working as well?

 

 

@steveatsafe , here are my answers in BOLD

I am assuming you are on Windows System.

  • What version of FME are you using? FME 2018
  • What version and type of the Oracle Client do you have installed? 12.1.0
  • Has this function on your computer before in other versions of FME? Yes
  • Do you have more than one version of Oracle Client Installed? No
  • Check for the existence of the environment variable TNS_ADMIN. If this exists, FME will be using this to discover your tnsnames.ora file. If this is being used, confirm that tnsnames.ora file contains the correct TNS entry. No Entry TNS_ADMIN

It is very odd that you have a partial working connection.

Please confirm that if you go to FME Options>Database Connections, right-click on the connection and click edit... please provide the syntax you have used... and also test the connection here (I think you shared it works but want to confirm this).

image attached

If you don't mind, could you also share the syntax you have used in the embedded connection parameters that are working as well?

This I cannot share, because of security.

 

 


 

@steveatsafe , here are my answers in BOLD

I am assuming you are on Windows System.

  • What version of FME are you using? FME 2018
  • What version and type of the Oracle Client do you have installed? 12.1.0
  • Has this function on your computer before in other versions of FME? Yes
  • Do you have more than one version of Oracle Client Installed? No
  • Check for the existence of the environment variable TNS_ADMIN. If this exists, FME will be using this to discover your tnsnames.ora file. If this is being used, confirm that tnsnames.ora file contains the correct TNS entry. No Entry TNS_ADMIN

It is very odd that you have a partial working connection.

Please confirm that if you go to FME Options>Database Connections, right-click on the connection and click edit... please provide the syntax you have used... and also test the connection here (I think you shared it works but want to confirm this).

image attached

If you don't mind, could you also share the syntax you have used in the embedded connection parameters that are working as well?

This I cannot share, because of security.

 

 

Hi @fkemminje,

Where did you get with this? Sorry that we (and I) never got back to you. Did you connect with us via www.safe.com/support?


Do you have multiple Oracle installs (Oracle Homes) on your computer?

FME will use the first one mentioned in the PATH and perhaps that one does not have the entry in the TNSNAMES file.

Just guessing, but this could be the cause.

Hope you will find the solution.

Hi @fkemminje @steveatsafe,

What bits-version of FME Desktop and Oracle Client are you using, 32-bits (x86) or 64-bits (x64)?

 

Both apps must have the same bits-version, so both 32-bits or both 64 bits!

Looking at your answer on TNS_ADMIN, you mention No Entry TNS_ADMIN. Did you look for it in your tnsnames.ora file or in the Windows Environment Variables list? To check the environment variable open a Windos command window: Open the Run dialog box with Windows key + R and type cmd, in the command window type set en look for TNS_ADMIN and if it's there, what value does it have.

Also, when in the command window, look at the PATH variable and copy the value in here please.

About the entry in the tnsnames.ora file, does it have the Service name alias GISRW you use in the Database Connection?

Did you test the connection in a command window using:

 

> tnsping GISRW

 

and

 

>sqlplus <user>/<password>@GISRW

(user and password are case sensitive) and what are the results?

Kind regards,

 

Krien

 

 


Hi @fkemminje,

Where did you get with this? Sorry that we (and I) never got back to you. Did you connect with us via www.safe.com/support?

@steveatsafei sent a msg . Please understand my question .fme desktop 2018 sends the named connection name(I mean database connection name WHICH IS ALREADY STORED IN FME DESKTOP) to serverName while connecting to oracle. And of course, that name will not be there in tns entry ora file. and this problem is not always, randomly it throws an error


Reply