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.
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:
■ 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
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.
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:
■ 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.
当一个持续时间较长的数据库操作在执行过程中遭遇空间分配失败时,
Oracle 可以将此操作暂时挂起(suspend),并在空间分配问题解决后恢复
(resume)其执行。当发生空间分配问题时,Oracle 数据库服务器不会立即
给执行此操作的用户返回错误提示,而是等待管理员解决此问题。当空间分
配问题被纠正后,挂起的操作可以自动地恢复执行。
只有在客户端使用 ALTER SESSION 语句的语法显式地将会话(session)设定
为可恢复( resumable)后,SQL 语句才能运行在可恢复模式下(resumable
mode)。
当满足以下条件之一时,运行于可恢复的空间分配模式下的语句将被挂起
(suspend):
● 无可用空间
● 达到最大的数据扩展(maximum extent)限制
● 超出空间配额(space quota)限制
在不可恢复的空间分配模式下,以上条件将导致运行错误,并使 SQL 语句回
滚(roll back)。
语句被挂起(suspend)将导致其所在事务(transaction)同时被挂起。事务
所使用的所有资源在语句挂起期间都将被保留。
当产生错误的条件消除后(例如,管理员进行了处理,或其他查询使用的排
序空间(sort space)已经被释放),被挂起(suspend)的语句将自动地恢复
(resume)执行。