If we try to export a dumpfile with the name, which is already present in that directory. then we will get error like ORA-27038: created file already exists
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file “/export/home/oracle/dbaclass_estim.dmp“
ORA-27038: created file already exists
Additional information: 1
So if the requirement is to overwrite the existing dumpfile, then REUSE_DUMPFILES parameter can be used with EXPDP.
REUSE_DUMPFILES
Overwrite destination dump file if it exists [NO].
DEMO:
PARFILE WITH REUSE_DUMPFILES=Y
cat exp_reusedmp.par dumpfile=dbaclass_estim.dmp logfile=dbaclass.log directory=EXPDIR tables=DBACLASS.OBJECT_LIST REUSE_DUMPFILES=Y
At this point, we already have the dumpfile dbaclass_estim.dmp . So the EXPDP job should overwrite this dumpfile.
expdp parfile=exp_reusedmp.par Export: Release 12.1.0.2.0 - Production on Mon Nov 19 12:53:54 2018 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Username: / as sysdba Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options Starting "SYS"."SYS_EXPORT_TABLE_01": /******** AS SYSDBA parfile=exp_reusedmp.par Estimate in progress using BLOCKS method... Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 29 MB Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER . . exported "DBACLASS"."OBJECT_LIST" 24.69 MB 219456 rows Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYS.SYS_EXPORT_TABLE_01 is: /export/home/oracle/dbaclass_estim.dmp Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Mon Nov 19 12:54:01 2018 elapsed 0 00:00:03
As expected, we didnt received the error – ORA-27038: created file already exists.