li
  当前位置:主页 > 性能优化 > 文章内容
li
ORA-12162: TNS:net service name一例
来源: www.ixdba.net  作者: IXDBA.NET官方    时间:2007-09-12   阅读:33  

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

 

可能问题:

IXDBA.NET技术社区

 

1~.bash_profile文件中估计没有正确设置ORACLE_SID环境变量

2:检查sqlnet.orasqlnet.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




  上一篇: JDBC连接oracle RAC数据库配置一...   下一篇: ORA-12709错误一例
li
 §相关评论  
 热点文章

·Resize datafile导致ASM Crash
·在Oracle10g RAC下新增ASM磁盘
·ORACLE SQL性能优化系列 (一)
·oracle性能调优:管理oracle日志
·oracle RAC环境中系统时钟的调
·why:Rac的心跳线不支持交叉线?
·RAC的VIP及实例依赖关系:版本O
·如何启动DataGuard的备用数据库
·系统表空间IO错误 数据损坏处理
·不幸中的万幸:遭遇ORA-00600 [
·用ORACLE的高级复制实现内外网
li
 编辑推荐
·Resize datafile导致ASM Crash
·在Oracle10g RAC下新增ASM磁盘
·ORACLE SQL性能优化系列 (一)
·oracle性能调优:管理oracle日志
·oracle RAC环境中系统时钟的调
·why:Rac的心跳线不支持交叉线?
·RAC的VIP及实例依赖关系:版本O
·如何启动DataGuard的备用数据库
·系统表空间IO错误 数据损坏处理
·不幸中的万幸:遭遇ORA-00600 [
·用ORACLE的高级复制实现内外网
li
 相关篇章
·JDBC连接oracle RAC数据库配置一...
·丢失redo文件,如何恢复?
·损坏控制文件的恢复方法
·损坏数据文件的恢复方法
·回滚段机制深入研究
·如何处理 Ora-600 4193 错误
·一次坏块的处理过程
·oracle多归档路径的设置
·redo文件为active状态的理解
·Linux系统中无法启动rman问题
·ORA-12709错误一例
·ORA-07445错误分析总结
·数据库物理分布设计
·关于HWM的一点研究
·Oracle9iR2 Data Guard的保护模式
·利用冷备创建standby
·Latch与lock示疑
·ORACLE SQL性能优化系列 (一)
·解读oracle控制文件
·我的一个总结:检查点SCN深入研究
 
li
设为首页 | 关于我们 | 技术服务 | 收藏本站 | 网站地图 | 联系方式 | 本站友情连接