You are hereBlogues / almudena's blog / Cómo eliminar un proceso de export data pump

Cómo eliminar un proceso de export data pump


Por: almudena - Publicado o: 15 October 2012

Temos dúas opcións para eliminar un proceso export data pump.
1) Dende a línea de comandos do expdp vía CRTL+C
   Partimos da execución dende línea de comandos do expdp é queremos parar a súa execución.

[oracle@oracle bin]$ $ORACLE_HOME/bin/expdp "'/ as sysdba'" full=y FLASHBACK_TIME=\"TO_TIMESTAMP\(TO_CHAR\(SYSDATE,\'YYYY-MM-DD HH24:MI:SS\'\),\'YYYY-MM-DD HH24:MI:SS\'\)\" directory=acc_data_pump_dir dumpfile=expdp_proba.dmp logfile=expdp_proba.log

Export: Release 11.2.0.3.0 - Production on Mon Oct 15 12:45:11 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
Starting "SYS"."SYS_EXPORT_FULL_01":  "/******** AS SYSDBA" full=y FLASHBACK_TIME="TO_TIMESTAMP(TO_CHAR(SYSDATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS')" directory=acc_data_pump_dir dumpfile=expdp_proba.dmp logfile=expdp_proba.log
Estimate in progress using BLOCKS method...


Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 741.5 MB


  Paramos o job  executando un CRTL+C o que nos devolverá ao prompt do expdp,

Export> 


  E e dende aquí paramos o job:

Export>  STOP_JOB
Are you sure you wish to stop this job ([yes]/no): yes
[oracle@oraclebin]$ 



2) Dende a línea de comandos do expdp vía opción ATTACH.
   Lanzamos un expdp dende linea de comandos pero en background, por exemplo, e queremos cancelar o expdp.

[oracle@oracle pre]$ nohup  $ORACLE_HOME/bin/expdp "'/ as sysdba'" full=y FLASHBACK_TIME=\"TO_TIMESTAMP\(TO_CHAR\(SYSDATE,\'YYYY-MM-DD HH24:MI:SS\'\),\'YYYY-MM-DD HH24:MI:SS\'\)\" directory=acc_data_pump_dir dumpfile=expdp_proba.dmp logfile=expdp_proba.log &
[1] 3342
[oracle@oracle pre]$ nohup: appending output to `nohup.out'


[oracle@oracle pre]$ tail -f nohup.out

Export: Release 11.2.0.3.0 - Production on Mon Oct 15 12:51:20 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
Starting "SYS"."SYS_EXPORT_FULL_02":  "/******** AS SYSDBA" full=y FLASHBACK_TIME="TO_TIMESTAMP(TO_CHAR(SYSDATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS')" directory=acc_data_pump_dir dumpfile=expdp_proba.dmp logfile=expdp_proba.log
Estimate in progress using BLOCKS method...

  Dende a BD, consultamos o nome do job:

12:54:53 SYS@pre> select owner_name,job_name, operation, job_mode, state, attached_sessions
12:55:05   2  from dba_datapump_jobs;

OWNER_NAME JOB_NAME              OPERATION       JOB_MODE     STATE         ATTACHED_SESSIONS
---------- -------------------------- --------------- ---------- --------------- -----------------
SYS       SYS_EXPORT_FULL_01          EXPORT          FULL     EXECUTING             1

  e a continuación atachamonos ao job,

[oracle@oracle pre]$ expdp "'/ as sysdba'"  attach=SYS_EXPORT_FULL_01

Export: Release 11.2.0.3.0 - Production on Mon Oct 15 12:55:55 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Release 11.2.0.3.0 - 64bit Production

Job: SYS_EXPORT_FULL_01
  Owner: SYS                           
  Operation: EXPORT                        
  Creator Privs: TRUE                          
  GUID: CC17D163D1670D10E043B97BA8C03A70
  Start Time: Monday, 15 October, 2012 12:51:23
  Mode: FULL                          
  Instance: pre
  Max Parallelism: 1
  EXPORT Job Parameters:
  Parameter Name      Parameter Value:
     CLIENT_COMMAND        "/******** AS SYSDBA" full=y FLASHBACK_TIME="TO_TIMESTAMP(TO_CHAR(SYSDATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS')" directory=acc_data_pump_dir dumpfile=expdp_proba.dmp logfile=expdp_proba.log
     FLASHBACK_TIME        12-OCT-15 12:51:23 PM                  
  State: EXECUTING                     
  Bytes Processed: 0
  Current Parallelism: 1
  Job Error Count: 0
  Dump File: /u01/expdp/pre1/expdp_proba.dmp
    bytes written: 4,096
 
Worker 1 Status:
  Process Name: DW00
  State: EXECUTING                     
  Object Schema: ACC
  Object Name: TIPO_FASE
  Object Type: DATABASE_EXPORT/SCHEMA/TABLE/TABLE
  Completed Objects: 1,476
  Worker Parallelism: 1

  Dende aquí matamos o job,

Export> KILL_JOB
Are you sure you wish to stop this job ([yes]/no): yes


  Comprobamos que o job xa non aparece na BD,

12:56:48 SYS@pre>
12:56:48 SYS@pre>  select owner_name,job_name, operation, job_mode, state, attached_sessions
12:56:55   2  from dba_datapump_jobs;

 no rows selected

12:56:55 SYS@pre>
Share this

Enviar un comentario novo

O contido deste campo é privado e non se amosará publicamente.
  • As direccións das páxinas web e as direccións de correo se convirten en enlaces automáticamente.
  • Tags HTML permitidos: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Os saltos de liña e párrafo créanse automaticamente.

Máis información acerca das opcións de formato

Image CAPTCHA
Escriba os caracteres que se amosan na imaxe.