Home » RDBMS Server » Networking and Gateways » TNSnames.ora
TNSnames.ora [message #182426] Fri, 14 July 2006 14:41 Go to next message
edora
Messages: 5
Registered: July 2006
Location: new jersy
Junior Member

Hi ! I have never used ORACLE before. Could you please tell in which folder I have to create the file tnsnames.ora
I am using SQL+ and probably will be using toad on Solaris.
Thank you, Ed.
Re: TNSnames.ora [message #182432 is a reply to message #182426] Fri, 14 July 2006 15:08 Go to previous messageGo to next message
Frank Naude
Messages: 4420
Registered: April 1998
Senior Member
Best place to put it is ORACLE_HOME/network/admin
Re: TNSnames.ora [message #182501 is a reply to message #182432] Sat, 15 July 2006 13:41 Go to previous messageGo to next message
edora
Messages: 5
Registered: July 2006
Location: new jersy
Junior Member

thank you for helping me out with the problem. Still ORA-12154: TNS:could not resolve service name. Do I have to add this directory to my Windows PATH? Thanks again.
Re: TNSnames.ora [message #182506 is a reply to message #182426] Sat, 15 July 2006 17:57 Go to previous messageGo to next message
BlackSwan
Messages: 23155
Registered: January 2009
Senior Member
It very well could be finding the tnsnames.ora file but its contents is not 100% correct.

Start sqlplus in one window (P#1)
From another window (P#1) determine P#!'s solaris process ID (PID#1)
From window #2 do
script capture.log
truss -p {PID#1}
From window #1 do
username/password@TNS_ALIAS
Control-C out of Window #1
This will terminate the truss in Windows #2
Issue Control-d in Window #2
vi capture.log
search for the string "tnsname"
The lines around the line containing "tnsnames" will show whether or not it was found and opened.

If/when tnsnames.ora gets opened, then the error if from the contents of the file; which is most likely the case.


HTH & YMMV
Re: TNSnames.ora [message #182704 is a reply to message #182506] Mon, 17 July 2006 12:02 Go to previous messageGo to next message
edora
Messages: 5
Registered: July 2006
Location: new jersy
Junior Member

Hi Anacedent,

you are correct, the contents was not correct!

It is working now.

Thank you.
Re: TNSnames.ora [message #204933 is a reply to message #182432] Wed, 22 November 2006 12:21 Go to previous messageGo to next message
edora
Messages: 5
Registered: July 2006
Location: new jersy
Junior Member

Hi ! I am looking for help again. I just rebuild my computer and install toad for Oracle. It gives me the following two error messages: Home directry doesn't exist and Home is not valid. Does it mean that I have to install Oracle client in order to get Oracle home directory where I could put tnsnames.ora file?

Thank you.
Re: TNSnames.ora [message #205133 is a reply to message #182426] Thu, 23 November 2006 07:19 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Yep do a Oracle Client install

You have to configure and put tnsnames.ora in for example "C:\oracle\ora92\network\ADMIN"

[Updated on: Thu, 23 November 2006 07:24]

Report message to a moderator

Re: TNSnames.ora [message #205228 is a reply to message #205133] Fri, 24 November 2006 00:29 Go to previous messageGo to next message
Littlefoot
Messages: 19890
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
TNSNAMES.ORA does not necessarily have to reside in ORACLE_HOME\NETWORK\ADMIN directory - it can be in any directory, just be sure to create a system environment variable called TNS_ADMIN which will point Oracle into the right direction.

For example, on MS Windows, it would look like this:
M:\>set tns_admin
tns_admin=C:\Oracle_library

M:\>
Re: TNSnames.ora [message #205442 is a reply to message #205133] Fri, 24 November 2006 19:13 Go to previous messageGo to next message
edora
Messages: 5
Registered: July 2006
Location: new jersy
Junior Member

Thank you everyone for your help.
Re: TNSnames.ora [message #300149 is a reply to message #182506] Thu, 14 February 2008 07:32 Go to previous messageGo to next message
ashish2345
Messages: 50
Registered: September 2007
Member
Hi Anacedent/all,

Can you help me?Actually I use sqlplus in unix box for my project.I tried to use it from sqlplus and toad.
Its giving error ORA-12154: TNS:could not resolve service name

I have tried my level best but could not get access..

I have placed the tnsnames.ora file at C:\oracle\ora92\network\ADMIN"

I don't know why is it not finding it.Rest of persons from my work are using thesame..

Can u guide

Also Should I have to update the listener file too?

reagards

[Updated on: Thu, 14 February 2008 07:43]

Report message to a moderator

Re: TNSnames.ora [message #300169 is a reply to message #182426] Thu, 14 February 2008 08:39 Go to previous messageGo to next message
ashish2345
Messages: 50
Registered: September 2007
Member
This is the services list


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0
LOCAL SERVER
Service "aashish" has 2 instance(s).
Instance "aashish", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "aashish", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "aashishXDB" has 1 instance(s).
Instance "aashish", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1002 state:ready
DISPATCHER <machine: ddd, pid: 3428>
(ADDRESS=(PROTOCOL=tcp)(HOST=ddd.mmmm.com)(PORT=2657))
The command completed successfully
Re: TNSnames.ora [message #300293 is a reply to message #182426] Thu, 14 February 2008 22:56 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
Post your tnsnames.ora file.

Re: TNSnames.ora [message #300310 is a reply to message #300149] Fri, 15 February 2008 00:20 Go to previous messageGo to next message
Michel Cadot
Messages: 60008
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-12154: TNS:could not resolve the connect identifier specified
 *Cause:  A connection to a database or other service was requested using
 a connect identifier, and the connect identifier specified could not
 be resolved into a connect descriptor using one of the naming methods
 configured. For example, if the type of connect identifier used was a
 net service name then the net service name could not be found in a
 naming method repository, or the repository could not be
 located or reached.
 *Action:
   - If you are using local naming (TNSNAMES.ORA file):
      - Make sure that "TNSNAMES" is listed as one of the values of the
        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA)
      - Verify that a TNSNAMES.ORA file exists and is in the proper
        directory and is accessible.
      - Check that the net service name used as the connect identifier
        exists in the TNSNAMES.ORA file.
      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
        file.  Look for unmatched parentheses or stray characters. Errors
        in a TNSNAMES.ORA file may make it unusable.
   - If you are using directory naming:
      - Verify that "LDAP" is listed as one of the values of the
        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA).
      - Verify that the LDAP directory server is up and that it is
        accessible.
      - Verify that the net service name or database name used as the
        connect identifier is configured in the directory.
      - Verify that the default context being used is correct by
        specifying a fully qualified net service name or a full LDAP DN
        as the connect identifier
   - If you are using easy connect naming:
      - Verify that "EZCONNECT" is listed as one of the values of the
        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA).
      - Make sure the host, port and service name specified
        are correct.
      - Try enclosing the connect identifier in quote marks.

   See the Oracle Net Services Administrators Guide or the Oracle
   operating system specific guide for more information on naming.

Regards
Michel
Re: TNSnames.ora [message #300463 is a reply to message #182426] Fri, 15 February 2008 08:48 Go to previous messageGo to next message
BlackSwan
Messages: 23155
Registered: January 2009
Senior Member
ashish2345,
post contents of both tnsnames.ora & sqlnet.ora which reside on new unix client system.
Re: TNSnames.ora [message #300638 is a reply to message #300463] Sun, 17 February 2008 04:23 Go to previous message
ashish2345
Messages: 50
Registered: September 2007
Member
Hi anacedent,

Sorry for late reply.Actually I removed sqlnet.ora file and the problem was solved.
I am out of office so can't provide the file..

regards
Previous Topic: HELP Getting ORA - 12500 ERROZR
Next Topic: Cannot insert through database link from 10g to 8.1.7
Goto Forum:
  


Current Time: Sat Dec 20 15:13:58 CST 2014

Total time taken to generate the page: 0.11976 seconds