问题描述:

oracle使用过一段时间,连接断开,报ORA-03135错误。

问题挖掘:

用pl/sql和sqlplus连接oracle,也存在该问题,确定该问题与连接方式无关。

查看服务器,发现没有防火墙,防火墙因素排除。

ping -t 服务器地址,发现没有丢包,都100%收到,网络通畅。

基本可以肯定问题出在oracle参数配置上。但也不排除其他因素。

解决过程:

根据ora-03135查询到oracle官方的解决方案:

ORA-03135: connection lost contact

Cause: 1) Server unexpectedly terminated or was forced to terminate. 2) Server timed out the connection.

Action: 1) Check if the server session was terminated. 2) Check if the timeout parameters are set properly in sqlnet.ora.

查询相关资料,发现该问题可能与sqlnet.ora设置参数SQLNET.EXPIRE_TIME 有关。因此在server上面的sqlnet.ora设置参数SQLNET.EXPIRE_TIME = 5(需在服务器监听reload一下使参数生效:lsnrctl reload),而在client不设置该参数,。等待一段时间后,没有出现该问题了,问题解决。

知识扩展:

在server端的sqlnet.ora文件中设置SQLNET.EXPIRE_TIME这一参数可以启用DCD功能,DCD是Dead Connection Detection的缩写,用于检查死掉但没有断开的session。

例如:
SQLNET.EXPIRE_TIME = 20
可以设置为任意数值,单位分钟。

重启listener

bash-2.05$ lsnrctl reload

……
The command completed successfully

DCD可以用于防止防火墙的timeout。

当新连接建立的时候,会读取sqlnet.ora中的这一设定,当20分钟间隔到达时,对inactive的session发送”probe” SQL*NET packet来确认client是否活着。如果已经死掉,那么相对应的resource会被自动清除。
如果client和server中间有防火墙,防火墙设有timeout参数,例如设置为一个小时,当一个小时中client和server间没有数据传输的时候,防火墙会断开连接。开启DCD后,通过设置SQLNET.EXPIRE_TIME的值小于防火墙的timeout参数可以避免这一情况。 “probe” package确保防火墙不会断开idle的session。

大多数情况下,这样操作就好了,要是还是不行就进行停止oracle实例和重启操作

1、启动数据库:
oracle@suse92:~> sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Jan 20 02:29:37 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 135352820 bytes
Fixed Size 455156 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 679936 bytes
Database mounted.

2、关闭数据库:
oracle@suse92:~> sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Jan 20 02:29:37 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> shutdwon abort;

3、启动监听器
oracle@suse92:~> lsnrctl start

4、停止监听器
oracle@suse92:~> lsnrctl stop

5、查看监听器状态
  lsnrctl">oracle@suse92:~>lsnrctl
  LSNRCTL> status
  LSNRCTL> exit

参考资料:

sqlnet.ora http://www.orafaq.com/wiki/Sqlnet.ora

oracle DCD http://www.dbafan.com/blog/?p=174

sqlnet.expire_time and IDLE_TIME http://space.itpub.net/10687595/viewspace-420407

SQLNET.EXPIRE_TIME 的官方说明

Purpose

Use parameter SQLNET.EXPIRE_TIME to specify a the time interval, in minutes, to send a probe to verify that client/server connections are active. Setting a value greater than 0 ensures that connections are not left open indefinitely, due to an abnormal client termination. If the probe finds a terminated connection, or a connection that is no longer in use, it returns an error, causing the server process to exit. This parameter is primarily intended for the database server, which typically handles multiple connections at any one time.

Limitations on using this terminated connection detection feature are:

·         It is not allowed on bequeathed connections.

·         Though very small, a probe packet generates additional traffic that may downgrade network performance.

·         Depending on which operating system is in use, the server may need to perform additional processing to distinguish the connection probing event from other events that occur. This can also result in degraded network performance.

Default

0

Minimum Value

0

Recommended Value

10

Example

SQLNET.EXPIRE_TIME=10

转载于:https://www.cnblogs.com/pennding/p/8881280.html

oracle10g连接自动断开,报ORA-03135错误相关推荐

  1. xshell通过隧道连接_工作常见问题--如何解决xshell远程连接自动断开的问题

    概述 今天碰到的一个关于xshell连接自动断开的问题,问题如下图所示,每次都是 1-2分钟就自动断开连接,这里总结分享下解决的一个过程. 1-2分钟就自动断开连接 1.服务器端的配置 作为服务器,默 ...

  2. xshell1分钟就会自动断_详解xshell远程连接自动断开的问题解决办法

    关于用xshell远程连接系统自动断开问题的解决办法: 1.服务器端的配置 我们都知道,作为服务器,默认一般都是被动的等待客户端的连接到来.但对基于ssh协议的xshell的运用,总是出现自动断开的情 ...

  3. 远程连接自动断开的问题解决办法 screen

    远程连接自动断开的问题解决办法 文章目录 1. 问题描述 2. 解决办法 2.1. screen解决方案 3. screen详解 3.1 安装screen 3.2 创建一个新的窗口 3.3 常用的命令 ...

  4. linux远程连接闪断,详解xshell远程连接自动断开的问题解决办法

    1.服务器端的配置 我们都知道,作为服务器,默认一般都是被动的等待客户端的连接到来.但对基于ssh协议的xshell的运用,总是出现自动断开的情况. vi命令打开/etc/ssh/sshd_confi ...

  5. 解决SecureCRT超时连接自动断开

    解决SecureCRT超时连接自动断开 解决办法是使用SecureCRT自带的反中断功能: 之后点击左上角的SecureCRT->preferences->然后在按照下图操作: 勾选Sen ...

  6. xshell远程连接自动断开的问题解决

    1.服务器端的配置 我们都知道,作为服务器,默认一般都是被动的等待客户端的连接到来.但对基于ssh协议的xshell的运用,总是出现自动断开的情况. vi命令打开/etc/ssh/sshd_confi ...

  7. linux自动断开会话,Linux系统SSH连接自动断开问题的解决方法

    当用SSH Secure Shell连接Linux时,如果几分钟没有任何操作,连接就会断开,必须重新登陆才行,每次都重复相同的操作,很是烦人,本文总结了两种解决的方法. 方法1:更改ssh服务器的配置 ...

  8. 阿里云服务器SSH连接自动断开问题

    SSH登录服务器命令:ssh root@47.107.**.** 但是发现SSH连接后一会儿客户端就被服务器T掉,分析后定位是SSH连接没有设置保活 于是解决方法有两个,要不设置SSH客户端保活,要不 ...

  9. 解决黑群晖DSM5.2系统SSH连接自动断开问题

    love421个人博客地址:https://www.makedreamsir.xyz 问题描述: 新装的群辉DSM5.2刚打开SSH功能,刚连上去就自动断开了,报错如下: Connecting to ...

  10. 如何解决linux的ssh连接自动断开的问题

    使用crt连接linux,会发现一种自动断线的问题.后来由篇文章是说,设置一个NO-OP参数,如下图: 根据自己的需要设置时间间隔就可以了. 转载于:https://www.cnblogs.com/c ...

最新文章

  1. 1.18.2.Table APISQL(概念与通用API、两种计划器(Planner)的主要区别、创建 TableEnvironment、临时表、永久表、创建表、虚拟表、Connector 等)
  2. 已知三个用不同数制表示的整数_数制的概念与常用的数制之间的转换。大学生必看!...
  3. 洛谷入门题P1046、P1047、P1427、P1428、P2141、P1567题解(Java语言描述)
  4. Linux下ARP相关操作
  5. 64位Java开发平台的选择,如何区分JDK,Tomcat,eclipse的32位与64版本
  6. 浏览器Browser截屏截长图使用记录220813
  7. C语言实现简单的小游戏之三子棋
  8. [SCOI2009]粉刷匠 两个dp
  9. ios键盘遮挡输入框问题
  10. mvcnn代码详解_使用colab运行tensorflow版本的faster-rcnn
  11. excel表格内文字怎么换行_Excel单元格内如何换行,这几招快拿小本本记下来
  12. Java/Android 进程与线程之 多线程开发(二)
  13. 【黄啊码】php结合redis实现商城在线秒杀抢购
  14. ORA-39087: Directory Name Is Invalid
  15. 动态ip导致的Discuz!Database Error解决方法
  16. [推荐] Chrome谷歌浏览器实时英文字幕插件
  17. 国内外一些ip反查域名的网站
  18. JS数组操作 速查手册
  19. Ubuntu18.04重启后内核自动更新显卡驱动失效
  20. 安装win10时关闭计算机,安装win10后,我关闭了这几个功能,电脑好用太多了!...

热门文章

  1. python股票_十分钟学会用Python交易股票
  2. STM32——库函数版——交叉闪烁灯程序
  3. 变速恒频风电机组的优缺点_风电消防安全解决方案解析
  4. 华为服务器修改密码命令,服务器用户名密码修改
  5. SwitchyOmega规则列表地址
  6. APNs Push Notification教程一
  7. mysql union all 等效_Mysql联合查询UNION和UNION ALL的使用介绍
  8. 2021-09-13强化学 习 原理及技术介绍
  9. 利用octave求逆矩阵
  10. conda:Could not find a version that satisfies the requirement XXX