How Resumable Space

来源:互联网 发布:上海网络文化节 编辑:程序博客网 时间:2024/06/06 08:24

文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14231/schema.htm#i1006595

 

How Resumable Space Allocation Works

 

The following is an overview of how resumable space allocationworks. Details are contained in later sections.

  1. A statement executes in a resumable mode only if its session hasbeen enabled for resumable space allocation by one of the followingactions:

    • The RESUMABLE_TIMEOUT initialization parameteris set to a nonzero value.

    • The ALTER SESSION ENABLE RESUMABLE statement isissued.

  2. A resumable statement is suspended when one of thefollowing conditions occur (these conditions result incorresponding errors being signalled for non-resumablestatements):

    • Out of space condition

    • Maximum extents reachedcondition(包括一个段的最大区间数达到的时候,会触发resumable,在视图Dba_Segments中可以查看到字段max_extents,即该列为段的最大区间数。)

    • Space quota exceeded condition.

---这是触发的条件:以上三个(总之,遇上空间问题,如果配置了 resumable的,那么会话会被挂起一定的时间。)

  1. When the execution of a resumable statement is suspended, thereare mechanisms to perform user supplied operations, log errors, andto query the status of the statement execution. When a resumablestatement is suspended the following actions are taken:

    • The error is reported in the alert log.

    • The system issues the Resumable Session Suspended alert.

    • If the user registered a trigger on the AFTERSUSPEND system event, the user trigger is executed. A usersupplied PL/SQL procedure can access the error message data usingtheDBMS_RESUMABLE package and the DBA_or USER_RESUMABLE view.

  2. Suspending a statement automatically results in suspending thetransaction. Thus all transactional resources are held through astatement suspend and resume.

  3. When the error condition is resolved (for example, as a resultof user intervention or perhaps sort space released by otherqueries), the suspended statement automatically resumes executionand the Resumable Session Suspended alert is cleared.

  4. A suspended statement can be forced to throw the exception usingthe DBMS_RESUMABLE.ABORT() procedure. This procedurecan be called by a DBA, or by the user who issued thestatement.

  5. A suspension time out interval is associated with resumablestatements. A resumable statement that is suspended for the timeoutinterval (the default is two hours) wakes up and returns theexception to the user.

  6. A resumable statement can be suspended and resumed multipletimes during execution.

原创粉丝点击