ORA-39001: invalid argument value-ORA-39000: bad dump file specification-ORA-31641: unable to create dump file “/data01/view_exp.dmp”-ORA-27038: created file already exists-Additional information: 1

Cause:

Error itself says that the dumpfile specified already exist on the directory

[oracle@orcl19x ~]$ expdp \'/ as sysdba\' directory=DATAPUMP dumpfile=view_exp.dmp logfile=view_exp.log views_as_tables=test_vu

Export: Release 12.1.0.2.0 - Production on Tue Jun 29 22:33:02 2021

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

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
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/data01/view_exp.dmp"
ORA-27038: created file already exists
Additional information: 1

Workaround:

Locate to the export directory and remove the old dump file. Then export the object or specify a new dump file name during export

[oracle@orcl19x ~]$ rm -rf /data01/view_exp.dmp

[oracle@orcl19x ~]$ expdp \'/ as sysdba\' directory=DATAPUMP dumpfile=view_exp.dmp logfile=view_exp.log views_as_tables=test_vu

Export: Release 12.1.0.2.0 - Production on Tue Jun 29 22:45:07 2021

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
Job "SYS"."SYS_EXPORT_TABLE_01" completed

Another option is to use to overwrite the existing dump files

REUSE_DUMPFILES
Overwrite destination dump file if it exists [NO].

[oracle@orcl19x ~]$ expdp \'/ as sysdba\' directory=DATAPUMP dumpfile=view_exp.dmp logfile=view_exp.log views_as_tables=sys.test_vu REUSE_DUMPFILES=Y

Export: Release 12.1.0.2.0 - Production on Tue Jun 29 23:36:07 2021

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
Job "SYS"."SYS_EXPORT_TABLE_01" completed

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s