1:TNS-12537, TNS-12560, TNS-00507的处理
启动监听报如下错误,一般情况下为/etc/hosts文件中回环地址信息内容误被删除导致。
[oracle@jason admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 21-JUL-2011 23:10:10
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /orac/orahome/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
[oracle@jason admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 21-JUL-2011 23:13:19
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /orac/orahome/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
[oracle@jason admin]$
修改/etc/hosts文件内容如下,启动正常。
[root@jason etc]# cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 jason localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
2:TNS-12545,TNS-12560,TNS-00515的处理
[oracle@jason admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 21-JUL-2011 23:07:50
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /orac/orahome/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /orac/orahome/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /orac/orahome/app/oracle/product/10.2.0/db_1/network/log/listener.log
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=jason)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 11: Resource temporarily unavailable
出现以上报错是由于监听的地址里设置为主机名,而/etc/hosts中未对该主机名进行解析,所以导致不能找到目标主机。
处理方法:
(1):将监听地址改为ip地址。
(2):在hosts文件中添加“主机ip 主机名”。
3:TNS-01189报错处理。
故障环境:
环境为浪潮bcp做的双机,由于双机出现故障,A机获取vip地址但未获取镜像磁
盘,启动数据库到nomount状态。
B机获取磁盘镜像并成功加载数据库,启动数监听时报如下错误:
TNS-01189: The listener could not authenticate the user
查看监听配置内容,监听地址为VIP地址,由于B机未获取到vip,所以监听勿以
为启动远程监听(这块牵扯到监听安全方面知识,详细查看官方资料),所以报TNS-01189错误。
解决方法:根据应用环境,使VIP地址切换到B机。
4: ORA-12547报错处理。
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Apr 18 13:39:29 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
SQL> conn /as sysdba
ERROR:
ORA-12547: TNS:lost contact
SQL>
查看$ORAHOME/BIN下oracle可执行文件权限是否为(6751)
# ll oracle
-rwsr-s--x 1 oracle oinstall 116208733 2011-06-14 oracle
如果这里不是这样,请使用:
chmod 6751 $ORAHOME/BIN/oracle
进行修改。