Monday, March 26, 2012

ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes

ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes error comes up when trying to export with the parallel option.

Most of the solution indicate to attach new dump files or not to use the parallel option. Issue could be resolved with a parametrized dumpfile name. The error was happening only on 10.2.0.1 (base version), on 10.2.0.4 (on RHEL4) and 10.2.0.5 (on RHEL5) expdp executed successfully without using the parametrized name.
$ expdp asa/asa directory=DPDUMPS dumpfile=expx.dmp logfile=expx.log query=table_name:'"where trunc(column_name) >= trunc(systimestamp - 365)"' tables=table_name parallel=2

Export: Release 10.2.0.1.0 - 64bit Production on Sunday, 25 March, 2012 12:05:51

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "asa"."SYS_EXPORT_TABLE_01":  asa/******** directory=DPDUMPS dumpfile=expx.dmp logfile=expx.log query=table_name:"where trunc(column_name) >= trunc(systimestamp - 365)" tables=table_name parallel=2
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 4.031 GB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes
With parameterized dumpfile name
$ expdp asa/asa directory=DPDUMPS dumpfile=expx_%U.dmp logfile=expx_`date +"%Y-%m-%d-%H%M"`.log query=table_name:'"where trunc(column_name) >= trunc(systimestamp - 365)"' tables=table_name parallel=2

Export: Release 10.2.0.1.0 - 64bit Production on Sunday, 25 March, 2012 12:13:12

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "asa"."SYS_EXPORT_TABLE_02":  asa/******** directory=DPDUMPS dumpfile=expx_%U.dmp logfile=expx_2012-03-25-1213.log query=table_name:"where trunc(column_name) >= trunc(systimestamp - 365)" tables=table_name parallel=2
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 4.031 GB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "asa"."table_name"                111.0 MB  884357 rows
Master table "asa"."SYS_EXPORT_TABLE_02" successfully loaded/unloaded
******************************************************************************
Dump file set for asa.SYS_EXPORT_TABLE_02 is:
  /data/dpdumps/expx_01.dmp
  /data/dpdumps/expx_02.dmp
  /data/dpdumps/expx_03.dmp
Job "asa"."SYS_EXPORT_TABLE_02" successfully completed at 12:13:31
This option generate multiple dumpfiles all of which is needed to do the import.
$ impdp test/test directory=DPDUMPS dumpfile=expx_%U.dmp logfile=impl.log full=y remap_schema=asa:test parallel=2

Import: Release 10.2.0.1.0 - 64bit Production on Sunday, 25 March, 2012 12:37:12

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Master table "TEST"."SYS_IMPORT_FULL_02" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_FULL_02":  test/******** directory=DPDUMPS dumpfile=expx_%U.dmp logfile=impl.log full=y remap_schema=asa:test parallel=2
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "TEST"."table_name"                    111.0 MB  884357 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "TEST"."SYS_IMPORT_FULL_02" completed with 1 error(s) at 12:37:59
As said earlier on 10.2.0.5 same could be executed with a single dump file without any error
$ expdp asa/asa directory=dumpdir dumpfile=expx.dmp logfile=expx.log query=table_name2:'"where trunc(column_name) >= trunc(systimestamp - 365)"' tables=table_name2 parallel=2

Export: Release 10.2.0.5.0 - 64bit Production on Monday, 26 March, 2012 16:50:50

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "asa"."SYS_EXPORT_TABLE_01":  asa/******** directory=dumpdir dumpfile=expx.dmp logfile=expx.log 
query=table_name2:"where trunc(column_name) >= trunc(systimestamp - 365)" tables=table_name2 parallel=2
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 136 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "asa"."table_name2"               111.2 MB  885542 rows
Master table "asa"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for asa.SYS_EXPORT_TABLE_01 is:
  /ssdoracle/dpdumps/expx.dmp
Job "asa"."SYS_EXPORT_TABLE_01" successfully completed at 16:50:56
Although metalink note says this applies to 10.2 to 11.2 wasn't reproducible in 10.2.0.4 or in 10.2.0.5 which mean error could be happening intermittent (or only on base version). Haven't tried on 11.1 or 11.2 yet!.



Update 23 October 2012
Tested on 11.2.0.3 (PSU 11.2.0.2.0) and parallel option works without the need for a parametrized dump file.
expdp asanga/asa directory=DPDUMPS dumpfile=expx.dmp logfile=expx_`date +"%Y-%m-%d-%H%M"`.log  parallel=4 schemas=asanga

Export: Release 11.2.0.3.0 - Production on Tue Oct 23 10:31:15 2012

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "ASANGA"."SYS_EXPORT_SCHEMA_01":  asanga/******** directory=DPDUMPS dumpfile=expx.dmp logfile=expx_2012-10-23-1031.log parallel=4 schemas=asanga
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 7.312 MB
. . exported "ASANGA"."FULT"                             1.924 MB     251 rows
. . exported "ASANGA"."X"                                1.835 MB   56953 rows
. . exported "ASANGA"."S1"                               5.343 KB       9 rows
. . exported "ASANGA"."S2"                               5.320 KB       8 rows
. . exported "ASANGA"."Y"                                5.015 KB       2 rows
. . exported "ASANGA"."CHAINED_ROWS"                         0 KB       0 rows
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Master table "ASANGA"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for ASANGA.SYS_EXPORT_SCHEMA_01 is:
  /home/oracle/expx.dmp
Job "ASANGA"."SYS_EXPORT_SCHEMA_01" successfully completed at 10:31:46
Useful metalink note
Parallel Export Fails With ORA-39095 If There Are Less Specified Files Than Slaves [ID 433391.1]