tnsping ping fails, even though I can successfully connect to database
I believe this can happen when your ORACLE_HOME
environment variable is not set properly. tnsping
is still available from the PATH
, but it can't find its message files. What does echo %ORACLE_HOME%
show, and where is the Oracle client actually installed?
This wouldn't necessarily have any effect on access from Toad as it doesn't need to access ORACLE_HOME
directly; you may have given a full connection string, or it may be able to pick up a service name if TNS_ADMIN
is set.
EditYou might also have several Oracle products that are interfering with each other. If so try going to Start->All programs->Oracle Installation Products->Home Selector and picking the one that is related to the tnsping
you're executing. (Actually this is for the 9i client; I think for 10g you might need to use the universal installer, changing via Installed Products->Environment, but can't check).
In addition to setting the ORACLE_HOME variable you should also make sure that the c:\orant\bin; entry comes before any other path entries to other oracle clients you may have installed.