Solved

tnsping

Posted on 2013-05-24
7
925 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 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
Comment Utility
can we add using netmgr
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
>>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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 15

Accepted Solution

by:
Franck Pachot earned 500 total points
Comment Utility
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
Comment Utility
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 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
>>This means tnsping is working fine...

Correct.
0
 

Author Closing Comment

by:walkerdba
Comment Utility
fine
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

744 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

8 Experts available now in Live!

Get 1:1 Help Now