Skip to Main Content
  • Questions
  • Export tables from different schemas using DBMS_DATAPUMP api

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Amar.

Asked: November 11, 2020 - 9:50 am UTC

Last updated: November 11, 2020 - 11:44 am UTC

Version: 12.1.0.2.0

Viewed 1000+ times

You Asked

I have a requirement to export tables from different schemas using DBMS_DATAPUMP api. Below script is getting failed after exporting 0.5 GB data with below errors:
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.FETCH_XML_OBJECTS [JOB:"MySchama3"]
ORA-10260: limit size () of the PGA heap set by event 10261 exceeded
ORA-10260: limit size (1048576) of the PGA heap set by event 10261 exceeded
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPW$WORKER", line 11252


Script:
  h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => exportJobName); 
dbms_datapump.set_parallel(handle => h1, degree => 15); 
dbms_datapump.add_file(handle => h1, filename => exportLogFile, directory => exportLogDir, filetype => 3); 
dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0); 
dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_LIST', value => q'|'MySchema1','MySchema2','MySchema3'|');
dbms_datapump.metadata_filter(handle => h1, name => 'NAME_EXPR', value => q'|in ('Table1','Table2','Table3') |', object_path => 'TABLE');
dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS'); 
dbms_datapump.add_file(handle => h1, filename => exportJobName || '_EXPDAT_' || to_char(systimestamp,'dd-mm-yyyy_hh24-mi-ss-FF') || '_%U.DMP', directory => exportStageDir, filetype => 1); 
dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1); 
dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC'); 
dbms_datapump.set_parameter(handle => h1, name => 'COMPRESSION', value => 'ALL');
dbms_datapump.set_parameter(handle => h1, name => 'ENCRYPTION_ALGORITHM', value => 'AES256');
dbms_datapump.set_parameter(handle => h1, name => 'ENCRYPTION_PASSWORD', value => exportEncryptionPwd);
dbms_datapump.set_parameter(handle => h1, name => 'FLASHBACK_SCN', value => flashbackSCN);
dbms_datapump.Start_job(h1);
dbms_datapump.WAIT_FOR_JOB(h1,job_state);
dbms_datapump.Detach(h1); 
exception
    WHEN others THEN
        raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);

and Chris said...

This isn't really a data pump issue, the problem is this error:

ORA-10260: limit size (1048576) of the PGA heap set by event 10261 exceeded


The process is using more PGA than is allowed by this event. You'll have to speak with your DBAs to find out why they've set this value and get them to increase it.

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:9537851800346535926

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

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database