IDLE timeout parameter in Oracle(Oracle 中的 IDLE 超时参数)
问题描述
我们陷入了这样一种情况,即我们的一个进程在不接触数据库的情况下需要 3 小时的计算.Oracle 服务器和任何后续查询或提交关闭了在调用进程之前建立的连接抛出连接关闭异常.
We are stuck in a situation where one of our processes is taking 3 hours of computing without touching the database. The connection that was taken before calling the process gets closed by the Oracle server and any subsequent query or commit throws connection closed exception.
在我们看来,问题与 Oracle 出于某种原因关闭了长时间空闲的连接有关.
It appears to us that the problem is related to Oracle closing the connection that is idle for that long for some reason.
我们尝试在 sqlnet.ora 中更改 EXPIRE_TIMEOUT,但这也无济于事.
We tried changing EXPIRE_TIMEOUT in sqlnet.ora but that didn't help either.
我们可以做些什么来解决这个问题?
What can we do to resolve this problem?
推荐答案
尝试使用连接时遇到什么错误?
What is the error you get when you try to use the connection?
默认情况下,Oracle 不会因为不活动而关闭连接.您可以使用 IDLE_TIME 配置配置文件以使 Oracle 关闭非活动连接,但听起来您并没有这样做.您还可以配置 Oracle 以检测死连接并在客户端没有响应时关闭连接——如果客户端被埋三个小时,它可能没有及时响应.但这似乎不太可能是广告需要额外的配置步骤.
Oracle by default will not close a connection due to inactivity. You can configure a profile with an IDLE_TIME to cause Oracle to close inactive connections, but it doesn't sound like you've done that. You can also configure Oracle to detect dead connections and close the connection if the client doesn't respond-- if the client is buried for three hours, it's possible that it's not responding in a timely fashion. But that seems less likely ad requires additional configuration steps.
根据我的经验,更有可能的情况是您的网络正在断开连接.例如,如果您通过防火墙进行连接,防火墙会频繁关闭空闲时间过长的连接.
The more likely situation in my experience is that your network is dropping the connection. If you are connecting via a firewall, for example, the firewall will frequently close connections that have been idle too long.
您收到的实际 Oracle 错误消息将指出这些替代方案中的哪一个导致了您的问题.
The actual Oracle error message you are receiving will indicate which of these alternatives is causing your problem.
这篇关于Oracle 中的 IDLE 超时参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Oracle 中的 IDLE 超时参数
基础教程推荐
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01