Resumable Space Allocation (141)

Oracle提供了一种机制,可以在空间分配失败时暂停并稍后恢复大型数据库操作。当出现空间不足、达到最大区数或超出空间配额时,操作会被挂起。管理员可以采取措施解决错误,之后操作会自动恢复。

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.

可恢复空间分配
1. 将操作悬挂 , 待管理员改正错误后 , 悬挂的操作继续执行
2. 可以通过 ALTER SESSION ENABLE RESUMABLE 来使用该模式
3. 当空间不够 , 达到最大区数目 , 超过空间配额限制时 , Resumable space allocation is suspended.
错误消失时 , 悬挂的语句自动恢复

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-980849/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10599713/viewspace-980849/

### 可恢复错误及其解决方案 #### Oracle 中的可恢复语句机制概述 Oracle 数据库提供了一种称为“可恢复语句”的特性,允许长时间运行的操作在遇到特定类型的资源不足时被挂起并稍后继续执行。当数据库实例检测到某些条件(如空间不足)阻止操作完成时,会触发此功能。 对于提到的具体情况,在导入表数据对象过程中遇到了超时问题以及无法扩展回滚段的情况[^2]: - **ORA-31693**: 表明由于某个原因导致加载/卸载失败,并且该过程已被跳过。 - **ORA-30032 和 ORA-30036** 组合提示了一个典型的场景——即存在未决状态下的 SQL 语句因为等待时间超过设定阈值而终止;同时指出尝试增加undo tablespace中的segment大小也遭遇了障碍。 针对上述情形可以采取如下措施来解决 resumable error: 1. **调整参数设置** 修改 `RESUMABLE_TIMEOUT` 参数以延长默认等待时限,从而给予更多的时间让管理员解决问题后再自动重试。可以通过以下命令实现: ```sql ALTER SYSTEM SET RESUMABLE_TIMEOUT=3600; ``` 2. **监控与管理挂起点** 使用视图 `V$SESSION_WAIT` 或者专用工具包 DBMS_RESUMABLE 来跟踪当前存在的任何处于暂停状态的任务,并获取有关这些事件的信息以便及时处理潜在瓶颈。 3. **确保足够的 Undo Tablespace 容量** 鉴于报错显示 undo space 不足,需确认是否有充足的可用磁盘配额分配给对应的 UNDO 表空间。如果确实面临存储压力,则考虑扩充现有容量或是创建新的 UNDO 文件加入集群配置之中。 4. **优化作业调度策略** 如果可能的话重新规划大体积 DML 操作的日程安排避开高峰时段减少并发冲突的可能性进而降低因竞争引发的各种异常状况的发生几率。 通过实施以上建议能够有效缓解乃至消除由 resumable errors 所带来的负面影响,保障业务连续性和稳定性的同时提高整体性能表现。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值