Link to home
Create AccountLog in
Oracle Database

Oracle Database

--

Questions

--

Followers

Top Experts

Avatar of taaz
taaz

tns-03505:failed to resolve name
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

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of slightwv (䄆 Netminder)slightwv (䄆 Netminder)

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

please post your sqlnet.ora and tnsnames.ora

          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

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)slightwv (䄆 Netminder)

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of taaztaaz

ASKER


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)

 )

Avatar of taaztaaz

ASKER

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)

 )

there's your problem

you're looking for "orc"

but your tns entry is "orcl"

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of taaztaaz

ASKER

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

tnsping orcl?

Is there only one Oracle product on that server?

      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

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of taaztaaz

ASKER

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

Avatar of taaztaaz

ASKER

@ID: 37025482

yes


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

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of taaztaaz

ASKER

the typo error were not in the files  it was my mistakes writing it here.





Avatar of taaztaaz

ASKER

@ID: 37025570

Yes

TomasHelgi,

Again, the TNS-03505 is not listener related.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


from a command prompt post the results of: which tnsping

Avatar of taaztaaz

ASKER

@ID: 37025670

/u00/app/oracle/product/11.2.0/bin/tnsping

One more from a command line:
 ls -al /u00/app/oracle/product/11.2.0/network/admin

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of taaztaaz

ASKER

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

I was looking for the permissions and owners of the individual files not just the files themselves.

rather than retyping the output,  please just cut and paste

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

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of taaztaaz

ASKER


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

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?

what is "set 12"  ?

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of taaztaaz

ASKER

I've requested that this question be deleted for the following reason:

i have got the solution from the previous answers

What was the solution?

SOLUTION
Avatar of taaztaaz

ASKER

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

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.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


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.

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.

Avatar of taaztaaz

ASKER

Thanks

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.

Oracle Database

Oracle Database

--

Questions

--

Followers

Top Experts

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.