Focus On Oracle

Installing, Backup & Recovery, Performance Tuning,
Troubleshooting, Upgrading, Patching

Oracle Engineered System


当前位置: 首页 » 技术文章 » 案列分析

ORA-12547: TNS:lost contact

刚安装好的12.2.0.1,登陆sqlplus就有问题。查看参数信息、host信息、IP地址等都正常。最后通过relink重新编译后正常。

sqlplus错误信息

[oracle@od scripts]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Feb 14 01:42:09 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-12547: TNS:lost contact


Enter user-name:
ERROR:
ORA-12547: TNS:lost contact


Enter user-name:
ERROR:
ORA-12547: TNS:lost contact


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@od scripts]$

sqlnet.log信息

***********************************************************************

Fatal NI connect error 12547, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/pgold/oracle/product/122/bin/oracle)(ARGV0=oraclepgold)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus)(HOST=od.ohsdba.cn)(USER=oracle))))

  VERSION INFORMATION:
        TNS for Linux: Version 12.2.0.1.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 12.2.0.1.0 - Production
  Time: 13-FEB-2017 23:27:26
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12547

TNS-12547: TNS:lost contact
    ns secondary err code: 12560
    nt main err code: 517

TNS-00517: Lost contact
    nt secondary err code: 32
    nt OS err code: 0
2017-02-13T23:27:33.139797-05:00


***********************************************************************

错误代码信息查看

[oracle@od pgold]$
[oracle@od pgold]$ oerr tns 12560
12560, 00000, "TNS:protocol adapter error"
// *Cause: A generic protocol adapter error occurred.
// *Action: Check addresses used for proper protocol specification. Before
// reporting this error, look at the error stack and check for lower level
// transport errors. For further details, turn on tracing and reexecute the
// operation. Turn off tracing when the operation is complete.
[oracle@od pgold]$
[oracle@od pgold]$
[oracle@od pgold]$ oerr tns 517
00517, 00000, "Lost contact"
// *Cause: Partner has unexpectedly gone away.
// *Action: Investigate partner application for abnormal termination.
[oracle@od pgold]$
[oracle@od pgold]$
[oracle@od pgold]$ oerr tns 32
00032, 00000, "INTCTL: internal NS error"
// *Cause: Problem interfacing with TNS.
// *Action: Normally not visible to the user. Try starting INTCTL
// again.  If the error persists, check the product installation. If it is
// correct, contact Oracle Customer Support.
[oracle@od pgold]$
[oracle@od pgold]$
怀疑是安装时候出的问题,尝试relink
[oracle@od pgold]$ cd $ORACLE_HOME/bin
[oracle@od bin]$ relink all
writing relink log to: /pgold/oracle/product/122/install/relink.log
[oracle@od bin]$ tail -10 /pgold/oracle/product/122/install/relink.log
2  -lgeneric12 -lorazip -loraz -llzopro5 -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged  -lippsmerged -lippcore  -lippcpemerged -lippcpmerged  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lunls12  -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12  -laio -lons  -lfthread12   `cat /p
gold/oracle/product/122/lib/sysliblist` -Wl,-rpath,/pgold/oracle/product/122/lib -lm    `cat /pgold/oracle/product/122/lib/sysliblist` -ldl -lm   -L/pgold/oracle/product/122/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /pgold/oracle/product/122/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`

test ! -f /pgold/oracle/product/122/bin/oracle || (\
           mv -f /pgold/oracle/product/122/bin/oracle /pgold/oracle/product/122/bin/oracleO &&\
           chmod 600 /pgold/oracle/product/122/bin/oracleO )

mv /pgold/oracle/product/122/rdbms/lib/oracle /pgold/oracle/product/122/bin/oracle

chmod 6751 /pgold/oracle/product/122/bin/oracle
[oracle@od bin]$ ls -l /pgold/oracle/product/122/bin/oracle
-rwsr-s--x 1 oracle oinstall 408110137 Feb 14 01:57 /pgold/oracle/product/122/bin/oracle

问题解决

[oracle@od bin]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Feb 14 01:58:51 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> exit
Disconnected
[oracle@od bin]$



关键词:tns 

相关文章

Wireshark和Oracle TNS
ORA-12547: TNS:lost contact
Top