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