首页 > IT基础架构 > 网络安全 > Overview of Autonomous Transactions (150)

Overview of Autonomous Transactions (150)

原创 网络安全 作者:tsinglee 时间:2007-11-06 14:55:01 0 删除 编辑

Autonomous transactions are independent transactions that can be called from within
another transaction. An autonomous transaction lets you leave the context of the
calling transaction, perform some SQL operations, commit or undo those operations,
and then return to the calling transaction’s context and continue with that transaction.
Once invoked, an autonomous transaction is totally independent of the main
transaction that called it. It does not see any of the uncommitted changes made by the
main transaction and does not share any locks or resources with the main transaction.
Changes made by an autonomous transaction become visible to other transactions
upon commit of the autonomous transactions.
One autonomous transaction can call another. There are no limits, other than resource
limits, on how many levels of autonomous transactions can be called.
Deadlocks are possible between an autonomous transaction and its calling transaction.
Oracle detects such deadlocks and returns an error. The application developer is
responsible for avoiding deadlock situations.
Autonomous transactions are useful for implementing actions that need to be
performed independently, regardless of whether the calling transaction commits or
rolls back, such as transaction logging and retry counters.

1. 自治事务块独立与调用他的主事务
2. 自治事务可以再调用其他自治事务 , 除了资源上的限制 ,自治事务调用的嵌套层次没有限制.
3. 自治事务适合于独立的操作(不管调用事务是否提交或回滚) , 如 : 事务日志 ,及重试计数.


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
  • 博文量
  • 访问量