ORA-12547: TNS:lost contact故障的处理

redhat 5.4 oracle 10.2.0.5 rac其中一个节点连接实例时报ORA-12547: TNS:lost contact

[oracle@wj2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Nov 26 22:12:42 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved. 

ERROR:
ORA-12547: TNS:lost contact 

解决步骤如下:
1.先检查两个节点的操作系统内核参数是否有变化

[root@wj1 bin]# ulimit -a
 core file size (blocks, -c) 0
 data seg size (kbytes, -d) unlimited
 scheduling priority (-e) 0
 file size (blocks, -f) unlimited
 pending signals (-i) 16383
 max locked memory (kbytes, -l) 32
 max memory size (kbytes, -m) unlimited
 open files (-n) 1024
 pipe size (512 bytes, -p) 8
 POSIX message queues (bytes, -q) 819200
 real-time priority (-r) 0
 stack size (kbytes, -s) 10240
 cpu time (seconds, -t) unlimited
 max user processes (-u) 16383
 virtual memory (kbytes, -v) unlimited
 file locks (-x) unlimited 


[root@wj2 bin]# ulimit -a
 core file size (blocks, -c) 0
 data seg size (kbytes, -d) unlimited
 scheduling priority (-e) 0
 file size (blocks, -f) unlimited
 pending signals (-i) 16383
 max locked memory (kbytes, -l) 32
 max memory size (kbytes, -m) unlimited
 open files (-n) 1024
 pipe size (512 bytes, -p) 8
 POSIX message queues (bytes, -q) 819200
 real-time priority (-r) 0
 stack size (kbytes, -s) 10240
 cpu time (seconds, -t) unlimited
 max user processes (-u) 16383
 virtual memory (kbytes, -v) unlimited
 file locks (-x) unlimited 

两个节点一样排除内核参数的原因

2.在主机中安装了10g rac与11g rac所以要确认$ORACLE_HOME/bin/oracle文件权限是否有问题(rac下需要查看$ORACLE_HOME/bin/oracle和$GRID_HOME/bin/oracle)

[oracle@wj1 bin]$ ll $ORACLE_HOME/bin/oracle
 -rwsr-s--x 1 oracle oinstall 98849122 Nov 20 17:23 /u01/app/oracle/product/10.2.0/db/bin/oracle 

[oracle@wj2 bin]$ ll $ORACLE_HOME/bin/oracle
-rwxrwxr-x 1 grid oinstall 98849122 Nov 20 17:23 oracle 


[oracle@wj1 bin]$ ls -lrt $ORACLE_HOME/rdbms/lib/config.o
 -rw-r----- 1 oracle oinstall 816 Nov 20 17:24 /u01/app/oracle/product/10.2.0/db/rdbms/lib/config.o 

[oracle@wj2 bin]$ ls -lrt $ORACLE_HOME/rdbms/lib/config.o
-rwxrwxr-x 1 grid oinstall 816 Nov 20 17:24 /u01/app/oracle/product/10.2.0/db/rdbms/lib/config.o
[root@wj2 bin]# chown -R oracle:oinstall /u01/app/oracle 

很明oracle 10g rac的$ORACLE_HOME/bin/oracle与$ORACLE_HOME/rdbms/lib/config.o文件的所有者变成了grid用户,而grid用户是用来安装oracle 11g rac的。需要修改这两个文件的所有者

[oracle@wj2 bin]# chown -R oracle:oinstall $ORACLE_HOME/bin/oracle 

[oracle@wj2 bin]# chown -R oracle:oinstall $ORACLE_HOME/rdbms/lib/config.o 


[oracle@wj1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 Production on Wed Nov 26 16:45:40 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> 

小结:在同一主机上最好不要安装多个版本的软件,如果确实要安装不要在同一个oracle_base目录下安装不同的版本,很容易造成权限混乱。

发表评论

电子邮件地址不会被公开。