Solved

tnsping

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

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 76

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

839 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