Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

tnsping

Posted on 2013-05-24
7
Medium Priority
?
1,074 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
Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

 
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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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.  …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

715 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