next up previous contents
Next: Oracle Programming Up: The Listener Previous: Connecting remotely   Contents

Troubleshooting TNS

There is a nifty tool that you'll want to know about: tnsping. It does what you'd expect, and is basically like testing DNS name resolution using ping instead of a more appropriate tool. When you can't find a database via TNS it's pretty handy for figuring out why.

bash-2.05$ tnsping testdb
TNS Ping Utility for Solaris: Version - 
 Production on 11-OCT-2004 16:09:53
Copyright (c) 1997, 2003, Oracle.  All rights reserved.
Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (description = (address_list = (address = 
 (protocol = tcp) (host = (port = 1521))) 
 (connect_data = (sid = test)))
OK (10 msec)