Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oracle11g tnsping失败,但可以通过sqlplus连接到Oracle数据库_Oracle11g_Sqlplus_Oracleclient_Tnsnames_Tns - Fatal编程技术网

Oracle11g tnsping失败,但可以通过sqlplus连接到Oracle数据库

Oracle11g tnsping失败,但可以通过sqlplus连接到Oracle数据库,oracle11g,sqlplus,oracleclient,tnsnames,tns,Oracle11g,Sqlplus,Oracleclient,Tnsnames,Tns,我已经安装了Oracle客户端v。11.2.0.1,并设置TNS_ADMIN和ORACLE_HOME环境变量 使用sqlplus通过TNS别名连接到远程数据库效果良好: sqlplus username/password@ALIAS 但将tnsping转换为同一别名会导致以下错误: P:\>tnsping ALIAS TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 07-AUG-2 011

我已经安装了Oracle客户端v。11.2.0.1,并设置TNS_ADMIN和ORACLE_HOME环境变量

使用sqlplus通过TNS别名连接到远程数据库效果良好:

sqlplus username/password@ALIAS
但将tnsping转换为同一别名会导致以下错误:

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, facility=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

对于类似的问题(即堆栈溢出),tnsping至少能够从别名解析连接字符串。在这种情况下并非如此。这使我相信某些环境变量丢失或指向错误的位置。如果您有任何建议,我们将不胜感激。

问题是您没有正确安装产品。它找不到其消息文件,因此您看不到结果。TNS-3509意味着tnsping成功了。

我曾尝试过自定义安装ODBC驱动程序和SQL Developer,但遇到了这个问题。SQL开发人员可以很好地连接,但tnsping会产生3511错误。从另一个安装复制mesg文件时产生3505错误


安装管理员选项对我很有效。

您介意详细说明“找不到其邮件文件”吗?我运行了OracleUniversalInstaller,它没有错误地完成了。“尚未正确安装产品”似乎是Oracle支持论坛对各种问题的常见回应。我不想再重复整个过程,因为它可能第二次真正起作用。消息文件存储在rdbms/mesg中。我猜你没有正确设置路径。