Solved

tnsping

Posted on 2013-05-24
7
1,000 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 77

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 77

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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 15

Accepted Solution

by:
Franck Pachot earned 500 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 77

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

738 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