ORA-39325: TABLE_EXISTS_ACTION cannot be applied to “SYS”.”PROFITS”.

Cause:

This error occur because already there is an existing object under the schema you try to import

[oracle@dptest ~]$ impdp \'/ as sysdba\' directory=dpexp dumpfile=exp_view.dmp logfile=imp_view.log

Import: Release 12.1.0.2.0 - Production on Thu Nov 4 12:32:22 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
Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_FULL_01":  "/******** AS SYSDBA" directory=dpexp dumpfile=exp_view.dmp logfile=imp_view.log
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE
ORA-39325: TABLE_EXISTS_ACTION cannot be applied to "SH"."PROFITS".
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE_DATA
Job "SYS"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Thu Nov 4 12:32:25 2021 elapsed 0 00:00:02

Workaround:

Drop the object and perform the import

SQL> drop view SH.PROFITS;

View dropped.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@dptest ~]$ impdp \'/ as sysdba\' directory=dpexp dumpfile=exp_view.dmp logfile=imp_view.log

Import: Release 12.1.0.2.0 - Production on Thu Nov 4 12:37:51 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
Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_FULL_01":  "/******** AS SYSDBA" directory=dpexp dumpfile=exp_view.dmp logfile=imp_view.log
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE_DATA
. . imported "SH"."PROFITS"                              40.33 MB  916039 rows
Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at Thu Nov 4 12:38:01 2021 elapsed 0 00:00:09

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