zoukankan      html  css  js  c++  java
  • ORA-12547: TNS:lost contact

    碰到这个ORA-12547: TNS:lost contact的问题,翻了很多资料和METALINK,总结了一下原因:

    1 是由于rpm包没有安装,对于我们的生产环境,此包是安装的。

    admin@p1b:/home/admin>rpm -q glibc-devel

    glibc-devel-2.5-58.el5_6.4

    glibc-devel-2.5-58.el5_6.4

    admin@p1b:/home/admin>rpm -q libaio

    libaio-0.3.106-5

    libaio-0.3.106-5

    admin@p1b:/home/admin>

     

    2 是因为权限不足,

    linux 5.3 64位

    oracle 11G R2

    grid ,oracle用户使用sqlplus 连接无异常 但是其他用户使用sqlplus 连接时,报

    ORA-12547 : TNS:lost contact 错误

    由于数据库之前转移过目录,查看发现目录下

    /data2/oracle/product/11.2.0/bin/

    -rwxr-x--x 1 oracle oinstall 210824714 Jun 26 16:33 oracle 权限有问题,更改权限

    chmod 6751 oracle

    再次连接数据库,正常

     

    -rwsr-s--x 1 oracle oinstall 210824714 Jun 26 16:33 oracle

    我们的数据库是

    admin@p1b.ora.sd.aliyun.com:/home/admin>ls -lsr $ORACLE_HOME/bin/oracle

    223748 -rwsr-s--x 1 oracle asmadmin 228886426 Aug 19 02:26 /opt/11202/oracle/11.2.0/alibank/bin/oracle

    --属组应该是oinstall 而不是asmadmin

     

    oracle metalink中的解决方法:

    Solution

    To implement the solution, please execute the following steps:

    1.
    This could be due to kernel parameters settings
    Please check the notes below that provide the required settings for kernel parameters

    2.
    This could be due to Incorrect permissions on the ORACLE.exe
    The 'ls' command should show permissions 6751 (as follows)

    Please check the following:

    $ cd $ORACLE_HOME/bin
    $ ls -l oracle

    The output should be
    -rwsr-s--x 1 oracle dba

    If not then please execute the following
    $ chmod 6751 oracle

    Please also verify if the following are correct

    echo $ORACLE_HOME
    echo $ORACLE_SID
    echo $LD_LIBRARY_PATH
    echo $PATH

    3.
    If the above does not resolve I suggest that you shutdown the database and listener and then
    "relink all"

    对于生产库,relink all 有点危险,第一种在线安装rpm包,也需要考虑其对生产环境的影响。

  • 相关阅读:
    佛教:禅宗和净土--佛教的归途
    佛教:从精英到世俗
    佛教:神迹的演变。
    收藏品:MP3播放器
    淘书百胜楼
    Spring注解是如何生效的?
    logstash6.8.3 导入 CSV 文件到 ElasticSearch
    三个线程交替按顺序打印ABC之条件队列的理解
    谈谈多线程
    ElasticSearch如何更新集群的状态
  • 原文地址:https://www.cnblogs.com/noobkey/p/3540557.html
Copyright © 2011-2022 走看看