Home Privacy Policy Feedback Link to us Site Map
Loading

Oracle/PLSQL: ORA-12154 Error


Error:

ORA-12154: TNS:could not resolve service name

Cause:

You tried to connect to Oracle, but the service name is either missing from the TNSNAMES.ORA file or is incorrectly defined.

Action:

The options to resolve this Oracle error are:
  1. Make sure that the TNSNAMES.ORA file exists and is in the correct directory.
  2. Make sure that the service name that you are connecting to is included in the TNSNAMES.ORA file and that it is correctly defined.
  3. Make sure that there are no syntax errors in the TNSNAMES.ORA file. For example, if there are unmatched brackets in the file (ie: open bracket without the corresponding close bracket), the file will be rendered unusable.