sqlplus / as sysdba无法连接ORA-12547 TNS: Lost Contact

参考这个链接

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:

  1. to kernel parameters settings

  2. Incorrect permissions on the ORACLE executable

  3. Insufficient ulimit setting for stack

  4. $ORACLE_HOME/rdbms/lib/config.o is 0 bytes

  5. Oracle binaries have not been linked correctly
    SOLUTION:

  6. 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

  7. 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.

  1. Check to ensure the following two files are not 0 bytes:

$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,链接到想要的版本文件上去

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值