Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

tnsping

Posted on 2013-05-24
7
Medium Priority
?
1,105 Views
Last Modified: 2013-05-24
my tnsping is not working..

[oracle@mac dbs]$ tnsping primary

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-MAY-2013 08:55:57

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora

TNS-03505: Failed to resolve name
[oracle@mac dbs]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 24-MAY-2013 08:56:16

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mac)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                23-MAY-2013 16:39:02
Uptime                    0 days 16 hr. 17 min. 14 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/mac/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mac.localdomain)(PORT=1521)))
Services Summary...
Service "primary" has 1 instance(s).
  Instance "primary", status READY, has 1 handler(s) for this service...
Service "primaryXDB" has 1 instance(s).
  Instance "primary", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@mac dbs]$
0
Comment
Question by:walkerdba
  • 3
  • 3
7 Comments
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39194785
The error you are getting means tnsping cannot locate an entry tot primary in the tnsnames.ora file.

Check  /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora for an entry for primary.

If it isn't there, add it.
0
 

Author Comment

by:walkerdba
ID: 39194859
can we add using netmgr
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39194870
>>can we add using netmgr

You could but from your other question, netmgr isn't letting you.

From your other question as well:  If you aren't comfortable manually editing the tnsnames.ora file, try netca.
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 15

Accepted Solution

by:
Franck Pachot earned 2000 total points
ID: 39194878
Hi,
You can add:
PRIMARY=(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=primary))(ADDRESS=(PROTOCOL=TCP)(HOST=mac.localdomain)(PORT=1521)))
to /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
Regards,
Franck.
0
 

Author Comment

by:walkerdba
ID: 39194888
This means tnsping is working fine...

right..



[oracle@mac ~]$ tnsping primary

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-MAY-2013 09:35:30

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.12)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =primary)))
OK (120 msec)
[oracle@mac ~]$
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39194901
>>This means tnsping is working fine...

Correct.
0
 

Author Closing Comment

by:walkerdba
ID: 39195387
fine
0

Featured Post

Independent Software Vendors: 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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

885 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