Statement-Level Rollback Resumable Space Allocation【每日一译】--2012-11-05

来源:互联网 发布:unity3d 5.0 玻璃材质 编辑:程序博客网 时间:2024/06/06 02:30
If at any time during execution a SQL statement causes an error, all effects of the
statement are rolled back. The effect of the rollback is as if that statement had never

been run. This operation is a statement-level rollback.

如果在任何时间执行一个SQL语句导致一个错误,所有此语句的影响将回滚。回滚的影响

也意味着它从来没有被执行。这个操作是语句级别的回滚。

Errors discovered during SQL statement execution cause statement-level rollbacks. An
example of such an error is attempting to insert a duplicate value in a primary key.
Single SQL statements involved in a deadlock (competition for the same data) can also
cause a statement-level rollback. Errors discovered during SQL statement parsing,
such as a syntax error, have not yet been run, so they do not cause a statement-level

rollback.

在SQL执行时发现错误导致语句级别的回滚。一个列子比如一个错误是试图插入一个重复值

到一个主键。单独的SQL语句引起的死锁(相同数据的竞争)也可以导致语句级别的回滚。

错误发现在SQL语句解析,比如语法错误,没有被执行,所以它们没有导致一个语句级别的回滚。

A SQL statement that fails causes the loss only of any work it would have performed
itself. It does not cause the loss of any work that preceded it in the current transaction. If the
statement is a DDL statement, then the implicit commit that immediately preceded it is

not undone.

一个SQL语句失败导致的丢失仅对于它自已完成的任何工作。它不会导致任何工作的丢失在当前

的事务之前。如果这个语句是一个DDL语句,隐式提交将迅速的在这个回滚之前。

Note: Users cannot directly refer to implicit savepoints in rollback
statements

备注:用户不能直接干预隐式保存点在回滚语句。

Resumable Space Allocation
Oracle provides a means for suspending, and later resuming, the execution of large
database operations in the event of space allocation failures. This enables an
administrator to take corrective action, instead of the Oracle database server returning
an error to the user. After the error condition is corrected, the suspended operation
automatically resumes.

可恢复式的空间分配

ORACLE 提供了一个对于延期和稍后恢复的方法,对于大数据库操作执行在空间分配时

的错误事件中。它允许管理员去调整操作来代替数据库返回一个错误给用户。当错误的条件

正确后,延期的操作将自动恢复。

A statement runs in a resumable mode only when the client explicitly enables
resumable semantics for the session using the ALTER SESSION statement.
Resumable space allocation is suspended when one of the following conditions occur:

一个语句运行在一个可恢复模式仅当客户端显式允许可恢复的语义对用会话使用ALTER SESSION

语句。可恢复的空间分配会延期当下面几种条件发生时:

■ Out of space condition
■ Maximum extents reached condition
■ Space quota exceeded condition

#超出空间条件

#达到最大的区块

#空间配额超出

For nonresumable space allocation, these conditions result in errors and the statement
is rolled back.

对于不可恢复的空间分配,这些条件导致的错误并且执行的语句将回滚。
Suspending a statement automatically results in suspending the transaction. Thus all
transactional resources are held through a statement suspend and resume.

自动的延迟语句导致事务的延期。那样所有的事务资源被保留的通过一个语句延迟和恢复。
When the error condition disappears (for example, as a result of user intervention or
perhaps sort space released by other queries), the suspended statement automatically
resumes execution.

当错误条件消失时(比如,一个用户的干预或者可能排序空间释放被其它的查询),延期语句将

自动恢复执行。


原创粉丝点击