参考这个链接
http://www.cnblogs.com/zihanxing/articles/6278867.html
问题现象:
ORA-12547 TNS: Lost Contact
Getting the following error when trying to connect using Sql*Plus
ERROR:
$sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 – Production on Wed Mar 30 11:59:06 2011
Copyright © 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
CAUSE:
to kernel parameters settings
Incorrect permissions on the ORACLE executable
Insufficient ulimit setting for stack
$ORACLE_HOME/rdbms/lib/config.o is 0 bytes
Oracle binaries have not been linked correctly
SOLUTION:
Please check the notes below that provide the required settings for kernel parameters
Note 169706.1 Oracle Database on AIX,HP-UX,Linux,MacOSX,Solaris,Tru64
Please check permissions by running:
$ cd $ORACLE_HOME/bin
$ ls -l oracle
The output should show the correct permission which is:
-rwsr-s–x 1 oracle dba
If not, then please execute the following to correct the permissions:
$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle
$ ls -l oracle
3) Check the current ulimit setting for stack:
ulimit -a
Check the install guide for your specific platform and version of Oracle and set the stack appropriately.
$ORACLE_HOME/bin/oracle
$ORACLE_HOME/rdbms/lib/config.o
If yes, rename the following file:
$ cd $ORACLE_HOME/rdbms/lib
$ mv config.o config.o.bad
Then, relink the oracle binary:
$ relink oracle
5) Check the alert log for any errors (ORA-00020: maximum number of processes) and solve.
select * from v$resource_limit and check maximum utilization and limit values.
RESOURCE_NAME MAX_UTILIZATION LIMIT_VALUE
————- ————————– ————————–
processes 350 350
sessions 380 380
6) If the above does not resolve I suggest that you shutdown the database and listener and then “relink all”
Please refer the ORACLE SUPPORT DOCUMENT ID 422173.1
Thank You !!
原文:https://oracledbamasters.wordpress.com/tag/ora-12547/
Make FAILED to invoke “/usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/opt/oracle/product/11gR2/db”…’/opt/oracle/product/11gR2/db/rdbms/lib/config.o: file not recognized: File truncated,
可能原因1:
1, 有位同事写了一个Makefile导致文件被truncated的经验文档,其中有段分析----在较老的gcc版本上(不知道多老,至少4.1.2能叫老),编译器不会检查这种自己链接自己的语法错误,于是一股脑的把so库生成了,在运行时再去寻找动态库和其中的具体实现,而运行时这个so库已经在那里了,于是,你好我好大家好,程序一直运行的很好,这个Makefile中的语法错误也没有被发现。不过一旦到了新的gcc版本(当然,至少4.4.3能算是新),在编译库的时候,编译器会去被链接的动态库中去找它需要找的函数实现,于是,它读到了一个只生成了一部分的文件,当然就不认识了,告诉我们这个文件被截短了。
2, 之后在部署oracle的单板上执行rpm –qa gcc,发现有gcc两个版本
SZV1000105780:/etc/init.d # rpm -qa gcc
gcc-4.3-62.198
gcc-4.1.2_20070115-0.29.6
3, 继续执行gcc –v,发现真正使用的是gcc-4.1.2的版本,这个版本过低,导致编译失败。
但是查看了本地环境不是由于gcc版本过低造成的。继续排查。。。
4, 下面要做的是将gcc版本切到4.3,按照如下命令执行,再次执行gcc –v发现gcc版本已经更改。
cd /usr/bin
mv gcc gcc.bak //将原来的gcc文件备份
ln -s gcc-4.3 gcc //再建立一个名字为gcc,链接到想要的版本文件上去