Solved

tnsnames.ora help

Posted on 2001-06-25
9
2,142 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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 100 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now