小工具知识网

当前位置: 首页 > 行业知识 > 数据库学习案例20240227-数据库连接类故障-ORA-12547: TNS:lost contact

行业知识

数据库学习案例20240227-数据库连接类故障-ORA-12547: TNS:lost contact

2026-10-20 17:43:26 来源:互联网转载

1 操作系统和数据库版本

cat /etc/redhat-release 

Red Hat Enterprise Linux Server release 6. (Santiago)

SQL> select * from v$version;

BANNER

--------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE    11.2.0.4.0      Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

SQL> 

sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Feb 27 16:37:49 2024

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v$version;

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi

PL/SQL Release 10.2.0.5.0 - Production

CORE    10.2.0.5.0      Production

TNS for Linux: Version 10.2.0.5.0 - Production

NLSRTL Version 10.2.0.5.0 - Production

SQL> 

2 问题现象

sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Feb 27 16:31:39 2024

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create public database link portal319 connect to portal identified by "xxx" using '10.2.0.1/eomdb';

Database link created.

SQL> select * from dual@portal319;

select * from dual@portal319

                   *

ERROR at line 1:

ORA-12547: TNS:lost contact

3 问题处理

[eoms@yy admin]$ vi sqlnet.ora

tcp.validnode_checking=yes

sqlnet.encryption

SQLNET.EXPIRE_TIME=10

tcp.invited_nodes=(10.2.0.1,10.2.0.3)

sqlnet.inbound_connect_timeout=30

lsnrctl stop

lsnrctl start

 

上一篇:机房网线去哪里办理?

下一篇:怎么让本地服务器上?