Thursday, March 1, 2012

clean up datapump jobs

view name: dba_datapump_jobs, dba_datapump_sessions

1. check jobs in dba_datapump_jobs.

SQL> desc dba_datapump_jobs;
Name Null? Type
----------------------------------------- -------- ----------------------------
OWNER_NAME VARCHAR2(30)
JOB_NAME VARCHAR2(30)
OPERATION VARCHAR2(30)
JOB_MODE VARCHAR2(30)
STATE VARCHAR2(30)
DEGREE NUMBER
ATTACHED_SESSIONS NUMBER
DATAPUMP_SESSIONS NUMBER

2. find datapump job state

select owner_name, job_name, state from dba_datapump_jobs;

for cleanup, state should be not running.

3. you might kill stop_job jobs.

test jobs: expdp/impdp attache=job_name. If it is a stoped job, it will start automatically.

drop table owner.job_name;

4. check if job has gone from dba_datapump_jobs


interactive command:
ADD_FILE Add dumpfile to dumpfile set.
ADD_FILE=dumpfile-name
CONTINUE_CLIENT Return to logging mode. Job will be re-started if idle.
EXIT_CLIENT Quit client session and leave job running.
HELP Summarize interactive commands.
KILL_JOB Detach and delete job.
PARALLEL Change the number of active workers for current job.
PARALLEL=.
START_JOB Start/resume current job.
STATUS Frequency (secs) job status is to be monitored where
the default (0) will show new status when available.
STATUS=[interval]
STOP_JOB Orderly shutdown of job execution and exits the client.
STOP_JOB=IMMEDIATE performs an immediate shutdown of the
Data Pump job.


reference:
http://hi.baidu.com/nixsql/blog/item/e5415336e0bd2987a61e12b3.html

1 comment:

  1. Exit expdp/impdpd client and leave the job run

    import > exit_client

    ReplyDelete