Link to home
Start Free TrialLog in
Avatar of torrey_maggard
torrey_maggard

asked on

tnsnames.ora help

I am working with an exisitng Oracle database.  I am having problems connecting to the database using SQL Net.  I can connect using IPC on the server.  Checked the tnsnames.ora file, the listener.ora file, verified that the entries match, checked the status of the listener (it is up), and I am at a lost!  TNSPING is not resolving the connect descriptor that I have in the tnsnames file...however, if I enter TNSPING CNL-OVCOLLECT1 (where CNL-OVCOLLECT1 is the name of the SERVER, not the name of the sid, or the name of the connect descriptor in the tnsnames file!), then I get a good reply.  So, I finally deleted the tnsnames.ora file from the network/admin folder (just for grins), and the tnsping command listed above still works.  How is it resolving it? HELP!!!
-Torrey
Avatar of ashokskumar
ashokskumar

Hi,

At server side, you check the entries in listener.ora and bring up the listener and check listener status. You may specifiy the ip address instead of host name.  If the host name and ip address is not configured properly at server side or client side, it may give error.

At client side, you verify tnsnames.ora and check the service using tnsping utility.  Here also spefify host ip address instead host name.

Ashok.
If you want to use host name, you verify hosts file in /etc/hosts directory.
post your listener.ora and tnsnames.ora
tnsping replies to/resolves a services name, not a host name, not even in host naming.  It should not.  There are no tnsnames.ora if host naming is being used.  Start from scratch with Net8 Assistant, take a look a the documentation, start by creating your listener, configure listener, the profile, choose namning resolution, then services names, etc. For the right order to do these actions in detail, refer to the Oracle Networking manual.  Posting your tns_admin files for both server and client will help.
Hi!

Which platformm is used on server and on client - UNIX, Win, ...?

Have you muliplay ORACLE_HOMES ? And what is active?

SqlNET uses tnsnames.ora from active ORACLE_HOME.

How is configuret NetWork - DNS, DOMAIN_NAME, ... ?

Regards,
pm
ASKER CERTIFIED SOLUTION
Avatar of ashokskumar
ashokskumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of torrey_maggard

ASKER

Thanks for all of the suggestions!  I tried Net8 Assistant and it tested out fine, but still did not work outside of the Net8 Assistant.  Found out what the problem was..apparently oracle looks for the tnsnames.ora file first in the /var/opt/oracle folder, if not found, then it looks in the $ORACLE_HOME/network/admin folder.  I had a tnsnames.ora file in /var/opt/oracle and that was what it was using.  Once I renamed that file, it started using the file in the /network/admin folder.  

Thanks again!
-Torrey
Thanks for your feedback. Validating the comments and awarding points will help the forum to have quick and many responses, as you have experienced.
Great comments...it did prompt me to run the Net8 Assistant and that steered me into the general area where I needed to check. Thanks!