[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

tns-03505:failed to resolve name

Posted on 2011-10-25
34
Medium Priority
?
1,867 Views
Last Modified: 2012-06-27
when I run  
$tnsping orc
I get the following errot

used parameter files
/u00/app/oracle/product/11.2.0/network/admin/sqlnet.ora
Hi getting this error
TNS-03505 failed to resolve name

0
Comment
Question by:taaz
  • 13
  • 11
  • 7
  • +1
33 Comments
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37024931
Assuming this is the correct ORACLE_HOME look in /u00/app/oracle/product/11.2.0/network/admin/tnsnames.ora for an entry called orc

Also post the results from a command prompt of: what tnsping
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37024934
please post your sqlnet.ora and tnsnames.ora
0
 
LVL 26

Expert Comment

by:Tomas Helgi Johannsson
ID: 37025145
          Hi!

Make sure that the fully qualified hostname in ORACLE_HOSTNAME env variable is in the
/etc/hosts , listener.ora and tnsnames.ora files.

Regards,
    Tomas Helgi
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 37025213
The TNS-03505 is not related to the hostname of the host entry in the tnsnames.ora file.

It is due to Oracle not being able to locate the database alias requested.

roughly 90% of the time it is because there are multiple Oracle products installed and the wrong tnsnames.ora file is being used.

Then the second best fix is the default domain settings in the sqlnet.ora file and a mismatch in the tnsnames.ora file.
0
 

Author Comment

by:taaz
ID: 37025314

When I runtnsping from the server I get the error
TNS-03505.failed to resolve name
All this files are under $ORALCE_HOME/network/admin
sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (TNS)
NAMES.DIRECTORY_PATH=(TNSNAMES,HOSTNAME)


listener.ora

LISTENER =
  (DESCRIPTION_LIST
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST= abc)(PORT=1521))
  )
 )


tnsnames.ora

ORCL
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP) (HOST = abc) (PORT = 1521)0
  )

  (CONNECT_DATA =
   (SERVER =DEDICATED)
    (SERVICE_NAME = ORCL)

 )
0
 

Author Comment

by:taaz
ID: 37025321
When I runtnsping from the server I get the error
TNS-03505.failed to resolve name
All this files are under $ORALCE_HOME/network/admin
sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (TNS)
NAMES.DIRECTORY_PATH=(TNSNAMES,HOSTNAME)


listener.ora

LISTENER =
  (DESCRIPTION_LIST
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST= abc)(PORT=1521))
  )
 )


tnsnames.ora

ORCL
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP) (HOST = abc) (PORT = 1521)
  )

  (CONNECT_DATA =
   (SERVER =DEDICATED)
    (SERVICE_NAME = ORCL)

 )
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37025356
there's your problem

you're looking for "orc"

but your tns entry is "orcl"
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1000 total points
ID: 37025370
also note,  your tnsnames has bad formatting.   there should be an "=" after the ORCL

ORCL=
(DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP) (HOST = abc) (PORT = 1521)
  )

  (CONNECT_DATA =
   (SERVER =DEDICATED)
    (SERVICE_NAME = ORCL)
 )
0
 

Author Comment

by:taaz
ID: 37025447
When I runtnsping from the server I get the error
TNS-03505.failed to resolve name
All this files are under $ORALCE_HOME/network/admin


sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (TNS)
NAMES.DIRECTORY_PATH=(TNSNAMES,HOSTNAME)


listener.ora

LISTENER =
  (DESCRIPTION_LIST
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST= abc)(PORT=1521))
  )
 )


tnsnames.ora

ORCL =
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP) (HOST = abc) (PORT = 1521)
  )

  (CONNECT_DATA =
   (SERVER =DEDICATED)
    (SERVICE_NAME = ORCL)

 )

can you check it again please as getting same error
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37025482
tnsping orcl?

Is there only one Oracle product on that server?
0
 
LVL 26

Expert Comment

by:Tomas Helgi Johannsson
ID: 37025493
      Hi!

You need to provide a SID_LIST_LISTENER in your listener.ora file
describing the ORACLE_HOME etc that belongs to the SID.

Also try to add (if that doesn't work) the param EZCONECT to the
NAMES.DIRECTORY_PATH=(TNSNAMES,HOSTNAME,EZCONNECT)

Regards,
    Tomas Helgi
0
 

Author Comment

by:taaz
ID: 37025497
$tnsping orcl
used parameter files
/u00/app/oracle/product/11.2.0/network/admin/sqlnet.ora
TNS-03505 failed to resolve name
0
 

Author Comment

by:taaz
ID: 37025514
@ID: 37025482

yes

0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37025520
and the files above are from

/u00/app/oracle/product/11.2.0/network/admin

?

did you fix the tnsname.ora error I pointed out?

neither "orc" nor "orcl" are defined given the tnsnames.ora you have specified because it has improper content
0
 

Author Comment

by:taaz
ID: 37025570
the typo error were not in the files  it was my mistakes writing it here.




0
 

Author Comment

by:taaz
ID: 37025579
@ID: 37025570

Yes
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37025666
TomasHelgi,

Again, the TNS-03505 is not listener related.
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37025670
from a command prompt post the results of: which tnsping
0
 

Author Comment

by:taaz
ID: 37025749
@ID: 37025670

/u00/app/oracle/product/11.2.0/bin/tnsping
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37025862
One more from a command line:
 ls -al /u00/app/oracle/product/11.2.0/network/admin
0
 

Author Comment

by:taaz
ID: 37025904
i have the following in that directory      ls -al /u00/app/oracle/product/11.2.0/network/admin with
-wr-r--r--

listener.ora
tnsnames.ora
sqlnet.ora
shrept.lst
sqlnet.ora
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37025922
I was looking for the permissions and owners of the individual files not just the files themselves.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37025933
rather than retyping the output,  please just cut and paste

it should be easier for you and it makes sure the content is preserved
0
 

Author Comment

by:taaz
ID: 37025987

-rw-r--r--  1 oracle oracle  dba  830 set 12  12:12  listener     sameowner for all the files
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37026016
Running out of thinkgs this could be.


From a command prompt post the results of:
export TNS_ADMIN=/u00/app/oracle/product/11.2.0/network/admin
tnsping orcl



Is there a reason you cannot copy/paste the screen results?
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37026136
what is "set 12"  ?
0
 

Author Comment

by:taaz
ID: 37040958
I've requested that this question be deleted for the following reason:

i have got the solution from the previous answers
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37026311
What was the solution?
0
 

Assisted Solution

by:taaz
taaz earned 0 total points
ID: 37030942
@slightwv

well you are right i mean absolutely right, "Again, the TNS-03505 is not listener related."
it was a space error in the tnsnames.ora file

I  # the first line

#
ORCL =
   (DESCRIPTION =
         (ADDRESS_LIST =
         (ADDRESS = (PROTOCOL = tcp) (HOST = hostname) (PORT = 1521))
         )

        (CONNECT_DATA =
           (SERVER = DEDICATED)
               (SERVICE_NAME = ORCL)
       )
    )

I really appreciate to slightwv and sdstuber.  You deserve all the points. I should not have requested to delete the question as you put me to the right track to come to the solution.
please accept my appology.
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37030966
If we did not assist in the final answer then we should not get the points.

We were just curious as to the final solution.

Personally I wasn't aware that the tnsnames.ora file needed at least one comment at the top.  I knew it was picky about syntax but not that picky.

Feel free to accept your last post as the answer.  This might help others in the future.
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37030987
Should also mention:  

If you receive the emails from this question saying 'Objection Posted', it is a bug.  No one is objecting to the closure.

A bug has been filed on this issue.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 37031008
I don't understand the explanation.

having a # on a blank line won't hurt your tnsnames.ora

if you had the # on one of the lines in your ORCL stanza then it would mess it up.

I agree with the sentiment above.  
If we were helpful, then split however you feel is appropriate.
If we were not, then don't give either of us points.
0
 

Author Closing Comment

by:taaz
ID: 37061300
Thanks
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
What we learned in Webroot's webinar on multi-vector protection.
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.
This video shows how to recover a database from a user managed backup
Suggested Courses

831 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