ORA-12162: TNS:net service name is incorrectly specified问题
现象:
目前连接数据库时候出现问题了:
[oracle@as3]$ sqlplus “/ as sysdba”
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name: oral
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name: oral
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
可能问题:
1:~.bash_profile文件中估计没有正确设置ORACLE_SID环境变量
2:检查sqlnet.ora中sqlnet.authentication_services设置
3:用 orapwd 重建密码文件
解决问题:
上面的问题经过检查是由于ORACLE_SID设置引起的,主要是因为在oracle环境变量中,虽然设置了ORACLE_SID,但是没有export引起的。最后在~.bash_profile中设置
export ORACLE_SID,问题解决!
下面是metalink.的解释:
The information in this document.nbspapplies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.3 to 10.1.0.3
This problem can occur on any platform.
Affects most UNIX platforms (not seen on Microsoft Windows due to difference in BEQ communication specifics)
Errors
ORA-12162 "TNS:service name is incorrectly specified"
Symptoms
When trying to connect locally (BEQ) to the database, getting "ORA-12162 error tns:net service name
is incorrectly spelled"
This is unusual because a TNS:Net service name is not being specified, nor is the environement variable TWO_TASK set.
Cause
The user environment variable $ORACLE_SID is not set.
When this is not set, then SQL*Plus use, without a connect string, may result in an ORA-12162 error.
Solution
Add the ORACLE_SID to the .profile for the Oracle user.
This will give the BEQ adapter a route to connect to the instance.
References
原文地址:http://www.ixdba.net/article/ae/256.html
分享到:
相关推荐
ORA-12154: TNS: 无法解析指定的连接标识符的解决方法
oracle报错ora-12541:TNS无监听程序
解决ORACLE TNS: 无法解析指定的连接标识符; 里面有步骤
ora-12514:TNS:监听程序当前无法识别连接描述符中请求的服务bug,解决文档.
ora-01033:oracle initialization or shutdown in progress 解决方法 ora-01033:oracle initialization or shutdown in progress 解决方法 ora-01033:oracle initialization or shutdown in progress 解决方法 ora-...
最近在工作中遇到了一个问题,错误是Oracle dbca时报错:ORA-12547: TNS:lost contact,通过查找相关的资料终于找到了解决的方法,下面分享给大家,话不多说了,来一起看看详细的介绍吧。 环境: OS:RHEL6.5 x86-...
错误描述:oracle远程连接服务器出现 ORA-12170 TNS:连接超时 错误检查:有很多是oracle自身安装的问题,但是我这里服务器配置正常,监听正常,服务正常,远程可以ping通服务器。 这里主要是防火墙问题,解决办法: ...
ORA-12518 TNS:监听程序无法分发客户机连接,在您安装好数据库后配置连接数据库的过程中遇到这类问题应该很头疼吧,不过,当您还是四处查资料来解决您遇到的另你头疼的问题时,如果不经意间看到了这则贴子,那请您升...
在运行查询SELECT * FROM V$SESSION 会出现ORA-29275:部分多字节字符的错误,这是什么原因开始我不得其解,网上也没有介绍什么好办法。本文给出答案。
ORA-12560 TNS 协议适配器错误
ORA-00031:标记要终止的会话解决方案; ORA-00031:标记要终止的会话解决方案;
报错如下 报错: ORA-12170:TNS connect timeout occurred 第一反应是监听没开: 1. 测试了一下, 连接超时没用ping 通 C:\Users\Administrator>tnsping brorcl TNS Ping Utility for 64-bit Windows: Version 11.2...
ORA-32001:write to spfile requested but no spfile is in use请求写入spfile,但没有使用spfile的解决方法 在输入以下语句中报了这样的错误: SQL>alter system set control_files=’/u01/app/oracle/oradata/prod/...
主要介绍了连接Oracle数据库时报ORA-12541:TNS:无监听程序的图文解决教程,非常不错,具有参考借鉴价值,需要的朋友可以参考下
实验得来的,不是随便copy的, ORA-12560TNS协议适配器错误,这个问题可定可以解决
ORA-12514 TNS 监听程序当前无法识别连接描述符中请求的服务
ORA-12541 TNSno listener 的解决方案 ORA-12541 TNSno listener 的解决方案
oracle12c程序连接时异常: ORA-01017: 用户名/口令无效; 登录被拒绝 的解决方案。