?
Solved

tnsnames.ora help

Posted on 2001-06-25
9
Medium Priority
?
2,152 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
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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
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.
Suggested Courses

809 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