【故障处理】ORA-12162 错误的处理
【故障处理】ORA-12162: TNS:net service name is incorrectly specified
一.1 场景
今天拿到一个新的环境,可是执行sqlplus / as sysdba的时候不能登录,报ORA-12162: TNS:net service name is incorrectly specified的错误,之前没有碰到过,就随时记录下,备查。
一.2 实验还原
Last unsuccessful login: Thu Mar 19 16:59:06 BEIST 2015 on /dev/pts/0 from 200.31.177.54
Last login: Thu Jul 16 22:44:20 BEIST 2015 on ftp from ::ffff:200.31.156.201
*******************************************************************************
* *
* *
* Welcome to AIX Version 5.3! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
oracle@SJCk4:/home/oracle>
oracle@SJCk4:/home/oracle>
oracle@SJCk4:/home/oracle>ps -ef|grep ora_pmon_
oracle 348182 1 0 Apr 25 - 7:42 ora_pmon_DATAWDB
oracle 630842 1 0 Apr 25 - 20:02 ora_pmon_COGDB
oracle 843948 1 0 Apr 25 - 6:45 ora_pmon_ETLDB
oracle 5005418 4427974 0 09:44:03 pts/0 0:00 grep ora_pmon_
oracle@SJCk4:/home/oracle>ORACLE_SID=DATAWDB
oracle@SJCk4:/home/oracle>echo $ORACLE_SID
DATAWDB
oracle@SJCk4:/home/oracle>
oracle@SJCk4:/home/oracle>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 17 09:56:44 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
oracle@SJCk4:/home/oracle>echo $ORACLE_HOME
/app/oracle/product/10.2.0/db_1
oracle@SJCk4:/home/oracle>echo $ORACLE_SID
DATAWDB
oracle@SJCk4:/home/oracle>
oracle@SJCk4:/home/oracle>
oracle@SJCk4:/home/oracle>
oracle@SJCk4:/home/oracle>
oracle@SJCk4:/home/oracle>export ORACLE_SID=DATAWDB
oracle@SJCk4:/home/oracle>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 17 09:59:27 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>
SQL>
一.3 总结
[oracle@rhel6_lhr ~]$ oerr ora 12162
12162, 00000, "TNS:net service name is incorrectly specified"
// *Cause: The connect descriptor corresponding to the net service name in
// TNSNAMES.ORA or in the directory server (Oracle Internet Directory) is
// incorrectly specified.
// *Action: If using local naming make sure there are no syntax errors in
// the corresponding connect descriptor in the TNSNAMES.ORA file. If using
// directory naming check the information provided through the administration
// used for directory naming.
[oracle@rhel6_lhr ~]$
可以确定的是ORA-12162是由于ORACLE_SID未设置或者设置不正确导致的,推荐使用export ORACLE_SID=XXX来设置,当不能设置的时候再用ORACLE_SID=XXX来直接设置。
另外的一篇blog参考:http://blog.itpub.net/26736162/viewspace-1735917/
一.4 About Me
...........................................................................................................................................................................................
本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用
ITPUB BLOG:http://blog.itpub.net/26736162
本文地址:http://blog.itpub.net/26736162/viewspace-1736192/
本文pdf版:http://yunpan.cn/QCwUAI9bn7g7w 提取码:af2d
QQ:642808185 若加QQ请注明你所正在读的文章标题
创作时间地点:2015-07-17 10:00~ 2015-07-17 19:00 于外汇交易中心
<版权所有,文章允许转载,但须以链接方式注明源地址,否则追究法律责任!>
...........................................................................................................................................................................................
【故障处理】ORA-12162 错误的处理相关推荐
- 【故障处理】IMP-00010错误 12C的dmp文件导入11G
[故障处理]IMP-00010错误 12C的dmp文件导入11G [故障处理]IMP-00010错误 12C的dmp文件导入11G 1 BLOG文档结构图 2 前言部分 2.1 导读和注意事项 ...
- linux下ora-12505,甲骨文临时ORA 12505错误后的Linux启动
我遇到与Oracle一个很奇怪的现象,也许有人可以帮助我,让我总结一下真正的快:甲骨文临时ORA 12505错误后的Linux启动 我的首选操作系统是Debian的Linux操作系统,我使用的是Ora ...
- java ora 00911_ORA-00911错误
ORA-00911,"911"看着很霸气的错误号,虽然我还是Oracle的初学者,但每次碰到一个未见过的ORA错误号后,都有一种查案的赶脚,根据错误号.OERR.相关错误信息,判断 ...
- 关于Oracle的ORA 12505错误 ORA-12505, TNS:listener does not currently know of SID given in connect descrip
报错是这样的:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 一直用的好好的,突然 ...
- oracle提示01034,oracle数据库ORA 01034错误问题解决方案
ORA-01034错误的话: Oracle常见错误之一 这是个Oracle数据库服务器比较常见的错误.有经验的用户几乎马上就能解决这个错误,再不济也能马上到Metalink去搜索一下. 不幸的是,大多 ...
- PLSQL连接Oracle数据库时报ORA 12154错误的解决方法
pl/sql连接Oracle时遇到的问题: 解决办法:安装后将Oracle安装目录下的文件夹network(包括其中的子文件,其中主要是tnsnames.ora) 在pl/sql菜单–"工具 ...
- oracle导出1455,oracle 11g导出数据时报ORA 1455错误的处理方法
由于导出的该用户的表可能存在空数据表,那么可能就会出现此其异常. 首先: 查看: show parameter deferred_segment_creation;@H_403_7@ 如果为TRUE, ...
- dbca asm ora 01017错误
执行dbca,到选择数据库位置的时候,报错内容Can not use ASM for database storage due to ... ORA-01017: invalid username/p ...
- plsql 连接oralce数据库,报ora 12557 tns 协议适配器不可加载错误
使用plsql 连接oracle 数据库报ora 12557 错误: 解决方案: 1:首先确保服务中的service以及监听器都开启 2:F:\app\Administrator\product\11 ...
- 备库中ORA-00600错误的简单修复
最近偶尔会接到一条短信,提示某个备库中出现了ORA-00600的错误.对于这个问题还真不能心存侥幸,自己带着疑问查看了一下, 这是一个一主两备的库,主库和其中的一个备库没有任何的ORA-00600的错 ...
最新文章
- 剑指offer_第5题_用两个栈实现队列
- 下载apk文件之后变成zip的解决办法
- strcat()的实现
- c语言转换为python语言_python和c语言
- LeetCode 12/13 罗马数字与整型互转(哈希,贪心)
- 2021双11上云狂欢节 | 爆款产品底价全面开售
- matlab中solver函数_Simulink求解器(Solver)相关知识
- python命名规范_Python 常用命名规则
- STM32官方标准固件库下载及介绍
- can test 接收报文_电动汽车国标充电报文解析及应用
- php apache停止工作,apache http server已停止工作解决过程
- 黎曼猜想到底是什么意思?
- 嵌入式linux编程开发必备知识
- Redisson(2-3)分布式锁实现对比 VS Java的ReentrantLock的FairLock
- 华为手机无法安装ADB和HDB的处理
- 四舍六入五成双并保留一位有效位-数据修约
- 安卓app,iOS二维码下载链接FIR
- UVA207 ac心得
- 国外10个优秀域名工具站点 帮助搜索好域名
- C语言中的puts()、putchar()、printf()
热门文章
- h3c trunk口改access_关于h3c的trunk模式
- 思科交换机配置trunk模式及vtp
- 那些年我们一起追逐过的安全工具
- Java编程入门:使用Eclipse快捷键
- asp html css样式,aspupload
- dump日志分析工具
- 群晖Docker部署Calibre Web打造全功能书库
- [从零开始A31S]之安装虚拟机以及下载ubuntu
- PostgreSQL11.2-CN-v0.1中文手册.chm
- 镜像翻转_《蒙娜丽莎》镜像翻转后,暗藏神秘的第二张脸?网友:笑容消失了...