重庆思庄Oracle、Redhat认证学习论坛

标题: 正确停止Oracle expdp/impdp操作方法 [打印本页]

作者: mahan    时间: 2023-7-9 18:36
标题: 正确停止Oracle expdp/impdp操作方法

平时导入导出时由于命令错误想终止操作,于是就按ctr  + c 中进入export交互界面,然后exit退出然后查看操作系统进程发现没有expdp进程了以为就是停掉了,但发现导出的dmp文件还在一直增加,其实任务并没有停止。

正确方法


1、查看数据泵作业

SELECT owner_name, job_name, operation, job_mode,  

state, attached_sessions  

FROM dba_datapump_jobs  

WHERE job_name NOT LIKE 'BIN$%'  

ORDER BY 1,2;  

OWNER_NAME JOB_NAME            OPERATION JOB_MODE  STATE       ATTACHED

---------- ------------------- --------- --------- ----------- --------

SYSTEM     SYS_EXPORT_SCHEMA_02  EXPORT    SCHEMA    EXECUTING          1

SYSTEM     SYS_EXPORT_SCHEMA_01  EXPORT    FULL      NOT RUNNING        0


2.正确停止expdp导出任务使用stop_job

[oracle@database ~]$ expdp sys/oracle_4U  attach=SYS_EXPORT_SCHEMA_02
Export: Release 11.2.0.4.0 - Production on Mon Jan 26 10:31:42 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Job: SYS_EXPORT_SCHEMA_02
  Owner: SYS                           
  Operation: EXPORT                        
  Creator Privs: TRUE                           
  GUID: 0D85DF9D2F014494E053A80013AC483D
  Start Time: Monday, 26 January, 2015 10:27:03
  Mode: SCHEMA                        
  Instance: orcl
  Max Parallelism: 1
  EXPORT Job Parameters:
  Parameter Name      Parameter Value:
     CLIENT_COMMAND        "sys/******** AS SYSDBA" schemas=(prod,tts_fnd,tts_cms,tts_hr,tts_ecm,tts_coa,tts_exm,tts_htm) dumpfile=tt.dmp logfile=tt.log directory=test
  State: EXECUTING                     
  Bytes Processed: 17,595,108,512
  Percent Done: 81
  Current Parallelism: 1
  Job Error Count: 0
  Dump File: /oracle/backup/tt.dmp
    bytes written: 17,610,469,376  
Worker 1 Status:
  Process Name: DW00
  State: EXECUTING                     
  Object Schema: TTS_EXM
  Object Name: EXM_PERSON_ITEMS
  Object Type: SCHEMA_EXPORT/TABLE/TABLE_DATA
  Completed Objects: 80
  Total Objects: 1,400
  Worker Parallelism: 1
Export> stop_job=immediate







欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2