Oracle TNS problems? Oracle TNS problems? database database

Oracle TNS problems?


This is probably a configuration issue, which means it is difficult for us to solve remotely. The two things you need to check are

  1. The entries in your LISTENER.ORA file match your TNSNAMES.ORA file
  2. The information in your hosts file is correct.

Is this a local or a remote database you're attempting to connect to?

edit

The hosts file (in a windows environment) is in somewhere like

C:\WINDOWS\system32\drivers\etc

Obviously it depends on how your environment is set up (different drive letter or whatever).

edit

You need the GLOBAL_DBNAME in the listener file to match the SERVICE_NAME in the tnsnsames file i.e. ORCL


The error is probably in the listener.ora file. Try replacing localhost in the line reading (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) with the name OR the ip number of the server where the listener is running on.


I'd replace localhost with whatever ipconfig tells you is the IP address you are using.