Oracle - 如果 ORA-03135 连接丢失,事务会怎样? [英] Oracle - what happens with the transaction in case of ORA-03135 connection lost?

查看:38
本文介绍了Oracle - 如果 ORA-03135 连接丢失,事务会怎样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在生产环境中运行一个需要大量时间的删除语句,并且服务器在 30 分钟后关闭任何连接(ORA-03135,我在日志中看到的).

I need to run on production environemnt a delete statement that takes a lot of time and the server is closing any connection after 30 minutes (ORA-03135 from what I see in the logs).

如果我启动delete语句并且服务器关闭连接会发生什么?该语句会在服务器上完成执行还是会立即关闭并回滚?在这种情况下,SQL*Plus set autocommit on 命令可以帮助吗?

What will happen if I start the delete statement and the server will close the connection? Will the statement finish executing on the server or will it shut it down immediately and rollback? Can SQL*Plus set autocommit on command help in this case?

推荐答案

查看手册:https://docs.oracle.com/database/121/CNCPT/transact.htm#CNCPT037

交易结束
当发生以下任何操作时,交易结束:

End of a Transaction
A transaction ends when any of the following actions occurs:

  • 用户发出没有 SAVEPOINT 子句的 COMMIT 或 ROLLBACK 语句.
  • 用户运行 DDL 命令,例如 CREATE、DROP、RENAME 或 ALTER.
  • 用户从大多数 Oracle 数据库实用程序和工具中正常退出,导致当前事务被隐式提交.用户断开连接时的提交行为取决于应用程序且可配置.
  • 客户端进程异常终止,导致使用存储在事务中的元数据隐式回滚事务表和撤消段.
  • A user issues a COMMIT or ROLLBACK statement without a SAVEPOINT clause.
  • A user runs a DDL command such as CREATE, DROP, RENAME, or ALTER.
  • A user exits normally from most Oracle Database utilities and tools, causing the current transaction to be implicitly committed. The commit behavior when a user disconnects is application-dependent and configurable.
  • A client process terminates abnormally, causing the transaction to be implicitly rolled back using metadata stored in the transaction table and the undo segment.

这篇关于Oracle - 如果 ORA-03135 连接丢失,事务会怎样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆