Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Patrice.

Asked: July 27, 2016 - 5:07 pm UTC

Last updated: July 29, 2016 - 1:44 pm UTC

Version: oracle 11.2.0

Viewed 1000+ times

You Asked

Is there a way to keep the master table on the successful completion of a data pump import/export using the API? There looks to be a way to keep the master table when using interactive data pump (keep_master=Y).

and Chris said...

You mean with dbms_datapump?

If so, you can do this with dbms_datapump.set_parameter. e.g.:

dbms_datapump.set_parameter(handle, 'KEEP_MASTER', 'Y');


http://docs.oracle.com/database/121/ARPLS/d_datpmp.htm#ARPLS66059

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Patrice Carlson, July 27, 2016 - 5:55 pm UTC

Thank you for your response
Yes, dbms_datapump.
when I try
dbms_datapump.set_parameter (v_datapump_handle, 'KEEP_MASTER', 'Y');
I get this error ORA-390001: invalid argument value.
Any help is appreciated

Raj J, July 27, 2016 - 6:55 pm UTC

Try passing 1 instead of 'Y' as argument value.
Chris Saxon
July 29, 2016 - 1:44 pm UTC

Good catch, thanks Raj.

Patrice Carlson, July 27, 2016 - 6:56 pm UTC

the parameter value is a number (default is 0) not a character
when I change the value to 1 the master file is kept

dbms_datapump.set_parameter(handle, 'KEEP_MASTER', 1);


More to Explore

Data Pump

All of the database utilities including Data Pump are explained in the Utilities guide.