[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

tnsnames.ora help

Posted on 2001-06-25
9
Medium Priority
?
2,151 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:torrey_maggard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 1

Expert Comment

by:ashokskumar
ID: 6225592
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.
0
 
LVL 1

Expert Comment

by:ashokskumar
ID: 6225600
If you want to use host name, you verify hosts file in /etc/hosts directory.
0
 

Expert Comment

by:mohit_bhatnagar
ID: 6226001
post your listener.ora and tnsnames.ora
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 2

Expert Comment

by:noriegaa
ID: 6226353
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.
0
 
LVL 1

Expert Comment

by:rmyufa
ID: 6226976
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
0
 
LVL 1

Accepted Solution

by:
ashokskumar earned 400 total points
ID: 6228116

FOR noriegaa :

tnsping is used to test the service name based on the contents in the tnsnames.ora.  SEE THE TNSNAMES.ora details listed below.

PROD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 110.4.8.70)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = PROD)
    )
  )


The host parameter can be provided as ip address or host name. If you provide host name(server name instead ip address), you should have defined in your host file.  

This is what mentioned in the question
" (where CNL-OVCOLLECT1 is the name of the SERVER, not the name of the sid"

The server name CNL-OVCOLLECT1 should have been defined in the host file.

Net8 assistant is used to configure without knowing underlying details. It is menu driven interface to configure.  Here configuration is already made and error is being debugged. Without figuring out the error, as many time if you re-install, it will not be possible to fix the error. Questions are posted to get quick help by sharing the experience.  Refering documents will be a best way to under stand but it may take time.  Here the issue is not oracle configuration but at OS configuration(host file)

What do you mean by "There are no tnsnames.ora if host naming is being used"  

Unless clear about the subject, don't post contradictory comments.  It will only lead confusion and misunderstanding.

Ashok.



0
 

Author Comment

by:torrey_maggard
ID: 6228720
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
0
 
LVL 1

Expert Comment

by:ashokskumar
ID: 6229162
Thanks for your feedback. Validating the comments and awarding points will help the forum to have quick and many responses, as you have experienced.
0
 

Author Comment

by:torrey_maggard
ID: 6229242
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!  
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question