本文介绍了"ORA-03135:连接丢失了联系".插入大文件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用实体框架(ODP.Net)将潜在大量的二进制数据插入到远程Oracle(11g)数据库中.对于很小的文件(小于5 KB),它工作正常,但是对于较大的文件(例如,44 KB),我收到错误消息:"ORA-03135:连接失去联系".

I'm trying to do an insert with a potentially large amount of binary data into a remote Oracle (11g) database using Entity Framework (ODP.Net). It works fine for really small files (<5 KB), but for larger ones (e.g. 44 KB) I get an error: "ORA-03135: connection lost contact".

我不认为它会超时,因为在执行命令的一秒钟内就会发生异常.

I don't think it's timing out, as the exception occurs within a second of executing the command.

我尝试在连接字符串中设置以下两项,但无济于事:

I tried setting both of the following in my connection string, but to no avail:

  • Validate Connection=true
  • Pooling=false
  • Validate Connection=true
  • Pooling=false

我还查看了远程计算机上的listener.log文件.它显示正在建立的连接,但没有异常或终止连接的迹象.

I also looked in the listener.log file on the remote machine. It shows the connections being made, but no sign of exceptions or terminated connections.

我正在寻求建议的修复程序或故障排除方法.

I'm up for suggested fixes or troubleshooting methods.

访问本地网络上的Oracle实例时,相同的SQL操作起作用.

The same SQL operations work when accessing an Oracle instance on the local network.

推荐答案

这可能是一个复杂的问题,有许多可能的原因和解决方案.从这里开始:

This can be a complicated issue with many different possible causes and solutions. Start here:

http://www.dba-oracle.com/t_ora_03135_connection_lost_contact.htm

ORA-03135:连接失去联系

ORA-03135: connection lost contact

原因:1)服务器意外终止或被迫终止. 或2)服务器使连接超时.

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

操作:1)检查服务器会话是否终止. 2)检查超时参数是否在 sqlnet.ora.

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

当防火墙终止连接时进行远程连接时,ORA-03135错误很常见.

The ORA-03135 error is common when connecting remotely when a firewall terminates the connection.

ORA-03135错误的一种解决方案是增加sqlnet.ora文件中sqlnet.ora expire_time参数的值或检查SQL * Plus概要文件中的expire参数.

One solution for the ORA-03135 error is to increase the value of the sqlnet.ora expire_time parameter in the sqlnet.ora file or to check for a expire parameter in a SQL*Plus profile.

要诊断ORA-03135错误,请使用ps –ef | grep语法检查OS PID是否仍然存在.

To diagnose the ORA-03135 error, start by checking to see if the OS PID still exists, using the ps –ef|grep syntax.

检查客户端和服务器之间是否存在网络地址转换(NAT)

Check to see if there is a Network Address Translation (NAT) between the client and server

在Windows中,检查Windows防火墙是否正在检查您的本地连接:

In Windows, check to see if a Windows firewall is checking for your local connections:

Windows XP->控制面板->安全->高级"标签

Windows XP -> Control panel -> security -> Tab "Advanced"

此外,将参数sqlnet.inbound_connect_timeout和inbound_connect_timeout_listenername设置为0可以停止ORA-03135错误.

Also, setting the parameters sqlnet.inbound_connect_timeout and inbound_connect_timeout_listenername to 0 can stop the ORA-03135 error.

也如上所述,检查数据库警报日志中是否存在在断开连接的同时发生的错误.例如,有时它可能是由ora-600或ora-7445引起的.它不应出现在侦听器日志中,因为只有在握手完成后才出现此错误.

Also as above, check the database alert log for errors occurring at the same time as the connection dropping. Sometimes it can be caused by an ora-600 or ora-7445, for example. It shouldn't appear in the listener log as you only get this error after handshaking has been completed.

这篇关于"ORA-03135:连接丢失了联系".插入大文件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 12:57