Monitor Oracle Data Pump Resumable Waits with DBA_RESUMABLE
Monitor Oracle Data Pump Resumable Waits with DBA_RESUMABLE
When you run a large Oracle Data Pump import (impdp), the job can fail mid-way if a tablespace runs out of space. Oracle's resumable import feature prevents this by suspending the job instead of failing it, giving you time to fix the problem and then letting the job continue automatically.
What Is a Resumable Import?
A resumable operation is a database operation that can be paused when it hits a correctable error — such as a full tablespace — and then automatically resumed once the problem is fixed. Instead of losing all progress and restarting from zero, you add space and the import picks up where it left off.
Resumable Parameters and Data Pump Import
Data Pump impdp has no RESUMABLE, RESUMABLE_NAME or RESUMABLE_TIMEOUT parameters. Those three belong to the original imp utility. If you pass them to impdp, it switches to legacy mode and ignores them, because Data Pump provides resumable waits automatically for users granted the IMP_FULL_DATABASE role. To give the job a name you can find later, use JOB_NAME instead.
Original imp parameter | What impdp does with it |
|---|---|
resumable=y | Ignored — resumable waits are automatic for IMP_FULL_DATABASE users |
resumable_name | Ignored — name the job with JOB_NAME |
resumable_timeout | Ignored |
In the original imp utility, RESUMABLE_TIMEOUT set how long a suspended statement waited for the error to be fixed before it was terminated, with a documented default of 7200 seconds (2 hours). The Data Pump documentation does not list an equivalent impdp parameter.
The RESUMABLE Privilege
For impdp, resumable waits are provided automatically to users with the IMP_FULL_DATABASE role. The RESUMABLE system privilege is what a user needs to enable resumable space allocation for ordinary SQL statements with ALTER SESSION ENABLE RESUMABLE.
1grant resumable to <user>;
Oracle requires this grant because suspended statements can hold system resources while they wait.
Monitoring with DBA_RESUMABLE
A suspended import may not be obvious from the impdp session itself. Oracle reports the error in the alert log, and the statement appears in the DBA_RESUMABLE view, so check either one to know if the job is waiting.
Query 1 — Check Job Status
This query shows all active resumable statements and their current state:
1set lines 100 pages 999
2col name format a20
3
4select name
5 ,start_time
6 ,suspend_time
7 ,status
8from dba_resumable
9/
Column breakdown:
| Column | Description |
|---|---|
NAME | For a Data Pump job, the job name (JOB_NAME, or a default such as SYS_IMPORT_FULL_01) |
START_TIME | When the resumable statement started |
SUSPEND_TIME | When the statement was last suspended (null if it has never been suspended) |
STATUS | One of RUNNING, SUSPENDED, TIMEOUT, ERROR or ABORTED |
The DBA_RESUMABLE view displays all resumable statements currently executing or suspended in the system. When STATUS is SUSPENDED, the job is waiting for you to fix a resource problem before it can continue.
Query 2 — Find the Reason for Suspension
If a job is suspended, this query tells you exactly what went wrong:
1set lines 100 pages 999
2
3select error_msg
4from dba_resumable
5where name like '%&job_name%'
6/
The ERROR_MSG column holds the message for ERROR_NUMBER, the last correctable error, such as a space error on a tablespace that cannot extend. In the impdp log, Data Pump reports the wait as ORA-39171: Job is experiencing a resumable wait, and the follow-on message describes the cause.
Query 3 — Session, Timeout and Error Detail
The first two queries cover the job name, status and message. The view has 19 columns in Oracle 19c, and several of them answer the next questions a DBA asks: which session is stuck, how long it will wait, and which object needs space.
1set lines 200 pages 999
2col name format a25
3col error_parameter1 format a20
4col error_parameter2 format a20
5col sql_text format a60
6
7select name
8 ,session_id
9 ,instance_id
10 ,timeout
11 ,suspend_time
12 ,resume_time
13 ,error_number
14 ,error_parameter1
15 ,error_parameter2
16 ,sql_text
17from dba_resumable
18where status = 'SUSPENDED'
19/
How to read the output:
| Column | What it tells you |
|---|---|
SESSION_ID / INSTANCE_ID | The session and instance that run the suspended statement. On RAC, INSTANCE_ID names the instance to check. |
COORD_INSTANCE_ID / COORD_SESSION_ID | For parallel work, the instance and session of the parallel coordinator. |
TIMEOUT | The timeout of the resumable statement, in seconds. |
RESUME_TIME | The last time the statement resumed after a suspension. It is null until the first resume. |
ERROR_NUMBER | The code of the last correctable error. It is 0 while STATUS is RUNNING. |
ERROR_PARAMETER1 to ERROR_PARAMETER5 | The values placed into the error message, such as the object and tablespace names. They are null when there is no error. |
SQL_TEXT | The suspended statement, taken from V$SQL. |
START_TIME, SUSPEND_TIME and RESUME_TIME are VARCHAR2(20) columns, not DATE columns. Do not do date arithmetic on them without a conversion.
A statement can suspend and resume more than once during one run. A long import can show a recent RESUME_TIME and a newer SUSPEND_TIME when it fills a second tablespace after you fixed the first.
USER_RESUMABLE has the same columns except USER_ID, so a user without DBA access can run Query 3 against it for their own statements.
Which Errors Suspend a Statement
Only three classes of error are correctable. Any other error fails the statement as normal.
| Class | Example errors | Meaning |
|---|---|---|
| Out of space | ORA-01653 unable to extend table, ORA-01654 unable to extend index | The segment cannot get any more extents in its tablespace |
| Maximum extents reached | ORA-01631 max # extents reached in table, ORA-01632 max # extents reached in index | The object already has the maximum number of extents defined for it |
| Space quota exceeded | ORA-01536 space quota exceeded for tablespace | The user has used up their assigned quota in the tablespace |
The out-of-space class covers tables, indexes, temporary segments, undo segments, clusters, LOBs and partitions. An import that stops on temporary space during an index build is still a space problem. The fix goes to the temporary tablespace, not the target tablespace.
Confirm the Wait in V$SESSION_WAIT
When a statement is suspended, its session goes into a wait state. V$SESSION_WAIT shows that session with the event statement suspended, wait error to be cleared. Use the SESSION_ID from DBA_RESUMABLE as the SID:
1select sid
2 ,event
3 ,state
4 ,wait_time_micro
5from v$session_wait
6where event = 'statement suspended, wait error to be cleared'
7/
WAIT_TIME_MICRO is the time spent in the current wait, in microseconds, while STATE is WAITING. In 19c, the older SECONDS_IN_WAIT column still exists but is deprecated in favor of WAIT_TIME_MICRO.
Act on a Suspended Statement with DBMS_RESUMABLE
The DBMS_RESUMABLE package lets you read and change the timeout of another session, or end a suspended statement at once.
1select dbms_resumable.get_session_timeout(&session_id) from dual;
2
3exec dbms_resumable.set_session_timeout(&session_id, 10800)
4
5exec dbms_resumable.abort(&session_id)
GET_SESSION_TIMEOUTreturns the current timeout for the session, in seconds. It returns -1 if the session does not exist.SET_SESSION_TIMEOUTsets a new timeout in seconds. The change applies to the session at once. Use it when the space fix will take longer than the time left, for example while a storage team adds disk.ABORTmakes the suspended statement return its error now instead of waiting for the timeout. The call always succeeds. To run it you must own the session, have theALTER SYSTEMprivilege, or be a DBA.
For parallel DML or DDL, you can pass the session ID of any session that takes part in the parallel statement. If one parallel server process suspends and the operation is then ended, the whole parallel operation ends with the error.
Resumable Space for Ordinary SQL Sessions
Outside Data Pump, resumable mode is off by default for a new session. A session with the RESUMABLE privilege turns it on with ALTER SESSION:
1alter session enable resumable timeout 3600 name 'nightly load';
2
3alter session disable resumable;
The NAME value is what appears in the NAME column of DBA_RESUMABLE. If you leave it out, the default name has the form User username(userid), Session sessionid, Instance instanceid.
The RESUMABLE_TIMEOUT initialization parameter sets the default timeout for ALTER SESSION ENABLE RESUMABLE statements that give no timeout. Setting it to 0 turns resumable space allocation off for those sessions. If the parameter is not set, a session that enables resumable mode without its own timeout waits 7200 seconds.
You can also register an AFTER SUSPEND trigger. The database runs it each time a statement suspends. This example gives every suspended statement a three-hour timeout:
1create or replace trigger resumable_default_timeout
2after suspend
3on database
4begin
5 dbms_resumable.set_timeout(10800);
6end;
7/
Statements inside an AFTER SUSPEND trigger are always non-resumable and autonomous. Inside the trigger, DBMS_RESUMABLE.SPACE_ERROR_INFO returns the error type, object type, owner, tablespace and object name of the space error. A trigger can use it to log the problem or send a message.
Key Points to Remember
- Always monitor actively. A suspension may not be obvious from the
impdpsession — checkDBA_RESUMABLEor the alert log regularly. IMP_FULL_DATABASEusers get resumable waits automatically. TheRESUMABLEprivilege is forALTER SESSION ENABLE RESUMABLEin ordinary SQL sessions.JOB_NAMEis your tracking label. Choose a clear, unique job name so you can find your job easily inDBA_RESUMABLE.- The 7200-second (2 hour)
RESUMABLE_TIMEOUTdefault belongs to the originalimputility.impdpignores that parameter, and the Data Pump documentation does not state a timeout for its resumable waits. - After fixing the problem (for example, adding space to a tablespace), the suspended job resumes automatically — no manual restart needed.
USER_RESUMABLEis the same view scoped to the current user — useful for non-DBA users checking their own jobs.
Practical Example
Suppose your import is named PROD_IMPORT_2026. You would start the import like this:
1impdp system/password \
2 directory=DATA_PUMP_DIR \
3 dumpfile=export.dmp \
4 logfile=import.log \
5 job_name=PROD_IMPORT_2026
For a Data Pump job, the NAME shown in DBA_RESUMABLE comes from the job name (JOB_NAME, or the default SYS_IMPORT_FULL_01 style name). Then you watch the status with:
1select name, status, suspend_time
2from dba_resumable
3where name like '%PROD_IMPORT_2026%';
If you see STATUS = SUSPENDED, run the error query:
1select error_msg
2from dba_resumable
3where name like '%PROD_IMPORT_2026%';
Fix the reported issue (such as extending a tablespace), and the import continues on its own.
Troubleshooting Common Issues
- Other sessions block on the suspended job. Suspending a statement also suspends its transaction, so every lock and transactional resource it holds stays held until it resumes or fails. Fix the space problem first; do not wait for the timeout.
- The statement failed instead of resuming. A suspended statement that is not fixed within its timeout wakes up and returns the original error to the user. Check
TIMEOUTin Query 3 orDBMS_RESUMABLE.GET_SESSION_TIMEOUTbefore a long fix, and raise it if needed. - No row in
DBA_RESUMABLE. The view holds only statements that are executing or suspended now. A job that already failed or finished is gone, so check theimpdplog file and the alert log instead. - The alert log shows a suspension but nobody saw it. On each suspension the database writes the error to the alert log and raises the Resumable Session Suspended alert. The alert clears when the statement resumes.
References
- Oracle Data Pump Import Utility — Official Documentation (Oracle 19c) — Full reference for all
impdpparameters and usage. - Oracle Data Pump Legacy Mode (Oracle 19c) — Shows that
impdpignoresRESUMABLE,RESUMABLE_NAMEandRESUMABLE_TIMEOUTbecause the functionality is automatic forIMP_FULL_DATABASEusers. - DBMS_DATAPUMP — Oracle 19c PL/SQL Packages Reference — States that the Data Pump job name identifies the job in
DBA_RESUMABLEwhen it is suspended. - ORA-39171 — Oracle Error Help — Cause and action for the Data Pump resumable wait message.
- Original Import — Oracle 11g Utilities — The original
imputility'sRESUMABLEandRESUMABLE_TIMEOUTparameters, including the 7200-second default. - DBA_RESUMABLE — Oracle 19c Reference — Column definitions and description of the
DBA_RESUMABLEdata dictionary view. - DBA_RESUMABLE — Oracle 10g Reference (Classic) — Original detailed column reference for
DBA_RESUMABLE, includingERROR_MSGandERROR_NUMBER. - Managing Resumable Space Allocation — Oracle DBA Guide 11g — Administrator's guide explaining resumable space allocation, how to enable/disable it, and how to use
DBA_RESUMABLEfor monitoring. - GRANT Statement — Oracle SQL Reference — Official reference for the
GRANTstatement, including granting theRESUMABLEsystem privilege. - Resumable — Oracle Scratchpad (Jonathan Lewis) — Expert-level explanation of the resumable privilege, session control, and how
resumable_timeoutinteracts at the system and session level. - About RESUMABLE, RESUMABLE_NAME Parameter — Oracle FAQ Forums — Forum thread on the
RESUMABLEparameters of the export and import utilities, and whether Data Pump import is resumable by default. - Managing Resumable Space Allocation — Oracle 19c Administrator's Guide — The correctable error classes,
RESUMABLE_TIMEOUT,ALTER SESSION ENABLE RESUMABLE, theAFTER SUSPENDtrigger and theV$SESSION_WAITevent for a suspended statement. - DBMS_RESUMABLE — Oracle 19c PL/SQL Packages Reference — Syntax and privileges for
ABORT,GET_SESSION_TIMEOUT,SET_SESSION_TIMEOUTandSPACE_ERROR_INFO. - V$SESSION_WAIT — Oracle 19c Reference — Column definitions for
EVENT,STATEandWAIT_TIME_MICRO, and the deprecation ofSECONDS_IN_WAIT. - USER_RESUMABLE — Oracle 19c Reference — Description of the
USER_RESUMABLEview, the user-scoped counterpart toDBA_RESUMABLE.