2

I wrapped oracle's IMPDP and EXPDP in a console and could not find a good place for the return codes that these two return. I want to be more specific in pointing out errors than just a 0/1 Pass/Fail.

Shravan
  • 223
  • 1
  • 5
  • 12
  • Please clarify what you have done. Have you written stored procedures around the DBMS_DATAPUMP API? Or have you written a shell scripts or similar around the `impdp` and `expdp` executables? – APC May 10 '10 at 14:21
  • Sorry about the lack of clarity. Its using impdp and expdp executables and not stored proc using DBMS_DATAPUMP API.Now I am thinking the later would have been the better choice. – Shravan May 11 '10 at 06:38
  • It's worse than that - it seems to return 5 on success for me. This is with Oracle 11. – Tom Anderson Jun 24 '10 at 12:21
  • @Tom Anderson, I haven't had much more time to look into it, but it definitely doesn't look straight forward to me. – Shravan Jun 25 '10 at 10:43
  • I think that the 5 code is returned when the import is actually performed, but there was some kind of warning on the process. For example, the triggers associated to an imported table do not compile. – miguel perher Jun 05 '12 at 08:55

2 Answers2

1

It looks like oracles DataPump is returning only three exit codes.

  1. EX_SUCC 0 : The export or import job completed successfully. No errors are displayed to the output device or recorded in the log file, if there is one.

    2.EX_SUCC_ERR 5 : The export or import job completed successfully but there were errors encountered during the job. The errors are displayed to the output device and recorded in the log file, if there is one.

    1. EX_FAIL 1 :The export or import job encountered one or more fatal errors.

http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_overview.htm#SUTIL3834

0

If you specify a unique job name for the import and export, you can check the STATUS and ADDITIONAL_INFO (among other useful columns) under the all_scheduler_job_run_details view for success/failure status and any errors encountered.

Adam Hawkes
  • 7,218
  • 30
  • 57