tnsping fails, but can connect to Oracle DB via sqlplus
I've installed the Oracle Client v. 11.2.0.1 on a Windows XP machine and set both the TNS_ADMIN and ORACLE_HOME environment variables.
Using sqlplus to connect to a remote database via a TNS alias works fine:
sqlplus username/password@ALIAS
But a tnsping to the same alias results in the following error:
P:\>tnsping ALIAS
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 07-AUG-2
011 18:20:08
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Message 3511 not found; No message file for product=NETWORK, facility=TNSMessage
3512 not found; No message file for product=NETWORK, fac开发者_如何学JAVAility=TNSMessage 3513 n
ot found; No message file for product=NETWORK, facility=TNSMessage 3509 not foun
d; No message file for product=NETWORK, facility=TNS
For similar problems (i.e. on Stack Overflow here), tnsping is at least able to resolve the connection string from the alias. Not so in this case. This leads me to believe that some environment variable is missing or pointing to the wrong location. Any suggestions would be appreciated.
I had tried Custom installing just the ODBC drivers and SQL Developer, and ran into this problem. SQL Developer would connect just fine, but tnsping would produce the 3511 error. Copying mesg files from another installation produced a 3505 error.
Installing the Administrator option worked for me.
The problem is that you haven't installed the product correctly. It cannot find its message files, therefore you don't see the results. TNS-3509 means that the tnsping succeeded.
精彩评论