ORA-12154 Error

Liz Sanderson
Liz Sanderson
  • Updated

Symptom

Running a workspace with an Oracle Reader or Writer and you receive the following error:
Error connecting to Oracle database: message was `ORA-12154: TNS:could not resolve the connect identifier specified'. (serverType=`ORACLE8I', serverName=`ora11G', userName=`abc123', password=`***', dbname=`')

Cause

This error indicates that the TNSNAMES file was found, but that it was improperly formatted or contains invalid characters (common on Linux).

Resolution

If you are using Oracle on Linux, but editing the tnsnames.ora file on Windows then you likely have Windows line return characters inside the file. To remove them run the dos2unix command like so:

dos2unix tnsnames.ora 

If that doesn't work or you are on Windows, then rename the tnsnames.ora file to tnsnames.ora.old, create a blank text file, save it as tnsnames.ora and manually type in the information to recreate the tnsnames.ora. The point of this exercise is to remove any errors that were present in the old tnsnames.ora file, but difficult to see.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.